diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-01-15 16:14:51 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-01-15 16:14:51 -0800 |
commit | d5cfc8f5a014ca40c71c8355aa37074cc885297e (patch) | |
tree | 349e29bf38d1ab89b921d43c9632223d8eb21e52 /git-rev-parse.html | |
parent | 674f3e1acc5b11dca193bca8d2c5d8b7008c3274 (diff) | |
download | git-htmldocs-d5cfc8f5a014ca40c71c8355aa37074cc885297e.tar.gz |
Autogenerated HTML docs for v2.30.0-122-g4151f
Diffstat (limited to 'git-rev-parse.html')
-rw-r--r-- | git-rev-parse.html | 112 |
1 files changed, 66 insertions, 46 deletions
diff --git a/git-rev-parse.html b/git-rev-parse.html index 443db9377..6ab289921 100644 --- a/git-rev-parse.html +++ b/git-rev-parse.html @@ -1091,6 +1091,23 @@ explicitly.</p></div> </p>
</dd>
<dt class="hdlist1">
+--path-format=(absolute|relative)
+</dt>
+<dd>
+<p>
+ Controls the behavior of certain other options. If specified as absolute, the
+ paths printed by those options will be absolute and canonical. If specified as
+ relative, the paths will be relative to the current working directory if that
+ is possible. The default is option specific.
+</p>
+<div class="paragraph"><p>This option may be specified multiple times and affects only the arguments that
+follow it on the command line, either to the end of the command line or the next
+instance of this option.</p></div>
+</dd>
+</dl></div>
+<div class="paragraph"><p>The following options are modified by <code>--path-format</code>:</p></div>
+<div class="dlist"><dl>
+<dt class="hdlist1">
--git-dir
</dt>
<dd>
@@ -1104,126 +1121,129 @@ is not detected to lie in a Git repository or work tree print a message to stderr and exit with nonzero status.</p></div>
</dd>
<dt class="hdlist1">
---absolute-git-dir
+--git-common-dir
</dt>
<dd>
<p>
- Like <code>--git-dir</code>, but its output is always the canonicalized
- absolute path.
+ Show <code>$GIT_COMMON_DIR</code> if defined, else <code>$GIT_DIR</code>.
</p>
</dd>
<dt class="hdlist1">
---git-common-dir
+--resolve-git-dir <path>
</dt>
<dd>
<p>
- Show <code>$GIT_COMMON_DIR</code> if defined, else <code>$GIT_DIR</code>.
+ Check if <path> is a valid repository or a gitfile that
+ points at a valid repository, and print the location of the
+ repository. If <path> is a gitfile then the resolved path
+ to the real repository is printed.
</p>
</dd>
<dt class="hdlist1">
---is-inside-git-dir
+--git-path <path>
</dt>
<dd>
<p>
- When the current working directory is below the repository
- directory print "true", otherwise "false".
+ 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.
</p>
</dd>
<dt class="hdlist1">
---is-inside-work-tree
+--show-toplevel
</dt>
<dd>
<p>
- When the current working directory is inside the work tree of the
- repository print "true", otherwise "false".
+ Show the (by default, absolute) path of the top-level directory
+ of the working tree. If there is no working tree, report an error.
</p>
</dd>
<dt class="hdlist1">
---is-bare-repository
+--show-superproject-working-tree
</dt>
<dd>
<p>
- When the repository is bare print "true", otherwise "false".
+ Show the absolute path of the root of the superproject’s
+ working tree (if exists) that uses the current repository as
+ its submodule. Outputs nothing if the current repository is
+ not used as a submodule by any project.
</p>
</dd>
<dt class="hdlist1">
---is-shallow-repository
+--shared-index-path
</dt>
<dd>
<p>
- When the repository is shallow print "true", otherwise "false".
+ Show the path to the shared index file in split index mode, or
+ empty if not in split-index mode.
</p>
</dd>
+</dl></div>
+<div class="paragraph"><p>The following options are unaffected by <code>--path-format</code>:</p></div>
+<div class="dlist"><dl>
<dt class="hdlist1">
---resolve-git-dir <path>
+--absolute-git-dir
</dt>
<dd>
<p>
- Check if <path> is a valid repository or a gitfile that
- points at a valid repository, and print the location of the
- repository. If <path> is a gitfile then the resolved path
- to the real repository is printed.
+ Like <code>--git-dir</code>, but its output is always the canonicalized
+ absolute path.
</p>
</dd>
<dt class="hdlist1">
---git-path <path>
+--is-inside-git-dir
</dt>
<dd>
<p>
- 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.
+ When the current working directory is below the repository
+ directory print "true", otherwise "false".
</p>
</dd>
<dt class="hdlist1">
---show-cdup
+--is-inside-work-tree
</dt>
<dd>
<p>
- When the command is invoked from a subdirectory, show the
- path of the top-level directory relative to the current
- directory (typically a sequence of "../", or an empty string).
+ When the current working directory is inside the work tree of the
+ repository print "true", otherwise "false".
</p>
</dd>
<dt class="hdlist1">
---show-prefix
+--is-bare-repository
</dt>
<dd>
<p>
- When the command is invoked from a subdirectory, show the
- path of the current directory relative to the top-level
- directory.
+ When the repository is bare print "true", otherwise "false".
</p>
</dd>
<dt class="hdlist1">
---show-toplevel
+--is-shallow-repository
</dt>
<dd>
<p>
- Show the absolute path of the top-level directory of the working
- tree. If there is no working tree, report an error.
+ When the repository is shallow print "true", otherwise "false".
</p>
</dd>
<dt class="hdlist1">
---show-superproject-working-tree
+--show-cdup
</dt>
<dd>
<p>
- Show the absolute path of the root of the superproject’s
- working tree (if exists) that uses the current repository as
- its submodule. Outputs nothing if the current repository is
- not used as a submodule by any project.
+ When the command is invoked from a subdirectory, show the
+ path of the top-level directory relative to the current
+ directory (typically a sequence of "../", or an empty string).
</p>
</dd>
<dt class="hdlist1">
---shared-index-path
+--show-prefix
</dt>
<dd>
<p>
- Show the path to the shared index file in split index mode, or
- empty if not in split-index mode.
+ When the command is invoked from a subdirectory, show the
+ path of the current directory relative to the top-level
+ directory.
</p>
</dd>
<dt class="hdlist1">
@@ -2025,7 +2045,7 @@ Similar to above: <div id="footer">
<div id="footer-text">
Last updated
- 2020-11-23 11:57:47 PST
+ 2021-01-15 16:12:09 PST
</div>
</div>
</body>
|