]> git.ipfire.org Git - thirdparty/git.git/blobdiff - Documentation/git-rev-parse.txt
git-rev-parse.txt: clarify --git-dir
[thirdparty/git.git] / Documentation / git-rev-parse.txt
index 341ca90c6e2b40676d4be360118176a39955b11c..ff23cb0219d602803a83da273195fcc4ca71b5f5 100644 (file)
@@ -95,7 +95,7 @@ OPTIONS
        unfortunately named tag "master"), and show them as full
        refnames (e.g. "refs/heads/master").
 
---abbrev-ref[={strict|loose}]::
+--abbrev-ref[=(strict|loose)]::
        A non-ambiguous short name of the objects name.
        The option core.warnAmbiguousRefs is used to select the strict
        abbreviation mode.
@@ -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