summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e0d769d)
raw | patch | inline | side by side (parent: e0d769d)
author | Jonathan Nieder <jrnieder@gmail.com> | |
Fri, 26 Nov 2010 15:32:31 +0000 (22:32 +0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 29 Nov 2010 21:26:00 +0000 (13:26 -0800) |
The current behavior is often to print an absolute path rather than
a ../../etc string, but callers must be ready to accept a relative
path, too. The most common output is ".git" (from the toplevel of
an ordinary work tree).
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
a ../../etc string, but callers must be ready to accept a relative
path, too. The most common output is ".git" (from the toplevel of
an ordinary work tree).
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-rev-parse.txt | patch | blob | history |
index 4a27643c1ea0e908a0a54b84f668d5a80f6d7100..ff23cb0219d602803a83da273195fcc4ca71b5f5 100644 (file)
directory (typically a sequence of "../", or an empty string).
--git-dir::
- Show `$GIT_DIR` if defined else show the path to the .git directory.
+ Show `$GIT_DIR` if defined. Otherwise show the path to
+ the .git directory, relative to the current directory.
++
+If `$GIT_DIR` is not defined and the current directory
+is not detected to lie in a git repository or work tree
+print a message to stderr and exit with nonzero status.
--is-inside-git-dir::
When the current working directory is below the repository