Merge branch 'jh/strbuf-read-use-read-in-full' into maint
[gitweb.git] / Documentation / git-rev-parse.txt
index bf81b9734ee0360f632686af9b241a1eeadaf493..b6c6326cdc7bb42993cf16fcae0d492944720e51 100644 (file)
@@ -216,6 +216,9 @@ 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.
 
+--git-common-dir::
+       Show `$GIT_COMMON_DIR` if defined, else `$GIT_DIR`.
+
 --is-inside-git-dir::
        When the current working directory is below the repository
        directory print "true", otherwise "false".
@@ -233,6 +236,13 @@ print a message to stderr and exit with nonzero status.
        repository.  If <path> is a gitfile then the resolved path
        to the real repository is printed.
 
+--git-path <path>::
+       Resolve "$GIT_DIR/<path>" and takes other path relocation
+       variables such as $GIT_OBJECT_DIRECTORY,
+       $GIT_INDEX_FILE... into account. For example, if
+       $GIT_OBJECT_DIRECTORY is set to /foo/bar then "git rev-parse
+       --git-path objects/abc" returns /foo/bar/abc.
+
 --show-cdup::
        When the command is invoked from a subdirectory, show the
        path of the top-level directory relative to the current
@@ -301,8 +311,8 @@ Each line of options has this format:
 `<opt-spec>`::
        its format is the short option character, then the long option name
        separated by a comma. Both parts are not required, though at least one
-       is necessary. `h,help`, `dry-run` and `f` are all three correct
-       `<opt-spec>`.
+       is necessary. May not contain any of the `<flags>` characters.
+       `h,help`, `dry-run` and `f` are examples of correct `<opt-spec>`.
 
 `<flags>`::
        `<flags>` are of `*`, `=`, `?` or `!`.