From: Jon Seymour Date: Fri, 18 May 2012 09:23:24 +0000 (+1000) Subject: rev-parse doc: --git-dir does not always show a relative path X-Git-Tag: v1.7.11-rc0~16^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/d0740ce0ba9417c34e00b5a61161d84f85ba7fbc 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 Acked-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt index ff23cb0219..00e73c84c7 100644 --- a/Documentation/git-rev-parse.txt +++ b/Documentation/git-rev-parse.txt @@ -137,7 +137,8 @@ appending `/{asterisk}`. --git-dir:: Show `$GIT_DIR` if defined. Otherwise show the path to - the .git directory, relative to the current directory. + the .git directory. The path shown, when relative, is + relative to the current working directory. + If `$GIT_DIR` is not defined and the current directory is not detected to lie in a git repository or work tree