rev-parse doc: --git-dir does not always show a relative path
The description was misleading because it lead the reader to believe that --git-dir would always show a relative path when, in fact, the actual behaviour does not guarantee this. Rather, it was intended that the advice be given that if a relative path is shown, then the path is relative to the current working directory and not some other directory (for example, the root of the working tree). Signed-off-by: Jon Seymour <jon.seymour@gmail.com> Acked-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jon Seymour committed
May 18, 2012 at 19:23 UTC
d0740ce0ba9417c34e00b5a61161d84f85ba7fbc
1 file changed
+2
-1
Documentation/git-rev-parse.txt
+2
-1
@@ -137,7 +137,8 @@ appending `/{asterisk}`.
137
138
--git-dir::
139
Show `$GIT_DIR` if defined. Otherwise show the path to
140
- the .git directory, relative to the current directory.
140
+ the .git directory. The path shown, when relative, is
141
+ relative to the current working directory.
142
+
143
If `$GIT_DIR` is not defined and the current directory
144
is not detected to lie in a git repository or work tree