提交 80d868b0 编写于 作者: J Jonathan Nieder 提交者: Junio C Hamano

git-rev-parse.txt: clarify --git-dir

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: NJonathan Nieder <jrnieder@gmail.com>
Signed-off-by: NNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 e0d769d1
......@@ -136,7 +136,12 @@ appending `/{asterisk}`.
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册