Skip to content

Commit

Permalink
rev-parse doc: --git-dir does not always show a relative path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jon Seymour authored and Junio C Hamano committed May 18, 2012
1 parent 80d868b commit d0740ce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Documentation/git-rev-parse.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d0740ce

Please sign in to comment.