summaryrefslogtreecommitdiffstats
path: root/git-show-ref.html
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-06-13 14:00:15 -0700
committerJunio C Hamano <gitster@pobox.com>2023-06-13 14:00:15 -0700
commita7b2c10835189668841231edffc77e7dbb020487 (patch)
tree81ab47f1c1dd48484f1fc688df52cae1a79ec144 /git-show-ref.html
parentebf86a516b571680bb9ea1186c76734d87aad162 (diff)
downloadgit-htmldocs-a7b2c10835189668841231edffc77e7dbb020487.tar.gz
Autogenerated HTML docs for v2.41.0-28-gd7d884
Diffstat (limited to 'git-show-ref.html')
-rw-r--r--git-show-ref.html40
1 files changed, 25 insertions, 15 deletions
diff --git a/git-show-ref.html b/git-show-ref.html
index d52485dc0..ca0877c33 100644
--- a/git-show-ref.html
+++ b/git-show-ref.html
@@ -765,7 +765,7 @@ commit IDs. Results can be filtered using a pattern and tags can be
dereferenced into object IDs. Additionally, it can be used to test whether a
particular ref exists.</p></div>
<div class="paragraph"><p>By default, shows the tags, heads, and remote refs.</p></div>
-<div class="paragraph"><p>The --exclude-existing form is a filter that does the inverse. It reads
+<div class="paragraph"><p>The <code>--exclude-existing</code> form is a filter that does the inverse. It reads
refs from stdin, one ref per line, and shows those that don&#8217;t exist in
the local repository.</p></div>
<div class="paragraph"><p>Use of this utility is encouraged in favor of directly accessing files under
@@ -805,7 +805,7 @@ the <code>.git</code> directory.</p></div>
</dt>
<dd>
<p>
- Dereference tags into object IDs as well. They will be shown with "&#94;{}"
+ Dereference tags into object IDs as well. They will be shown with <code>{caret}{}</code>
appended.
</p>
</dd>
@@ -817,8 +817,8 @@ the <code>.git</code> directory.</p></div>
</dt>
<dd>
<p>
- Only show the SHA-1 hash, not the reference name. When combined with
- --dereference the dereferenced tag will still be shown after the SHA-1.
+ Only show the OID, not the reference name. When combined with
+ <code>--dereference</code>, the dereferenced tag will still be shown after the OID.
</p>
</dd>
<dt class="hdlist1">
@@ -848,7 +848,7 @@ the <code>.git</code> directory.</p></div>
</dt>
<dd>
<p>
- Do not print any results to stdout. When combined with <code>--verify</code> this
+ Do not print any results to stdout. When combined with <code>--verify</code>, this
can be used to silently check if a reference exists.
</p>
</dd>
@@ -857,10 +857,10 @@ the <code>.git</code> directory.</p></div>
</dt>
<dd>
<p>
- Make <em>git show-ref</em> act as a filter that reads refs from stdin of the
- form "<code>^(?:&lt;anything&gt;\s)?&lt;refname&gt;(?:\^{})?$</code>"
+ Make <code>git show-ref</code> act as a filter that reads refs from stdin of the
+ form <code>^(?:&lt;anything&gt;\s)?&lt;refname&gt;(?:\^{})?$</code>
and performs the following actions on each:
- (1) strip "&#94;{}" at the end of line if any;
+ (1) strip <code>{caret}{}</code> at the end of line if any;
(2) ignore if pattern is provided and does not head-match refname;
(3) warn if refname is not a well-formed refname and skip;
(4) ignore if refname is a ref that exists in the local repository;
@@ -885,7 +885,12 @@ the <code>.git</code> directory.</p></div>
<div class="sect1">
<h2 id="_output">OUTPUT</h2>
<div class="sectionbody">
-<div class="paragraph"><p>The output is in the format: <em>&lt;SHA-1 ID&gt;</em> <em>&lt;space&gt;</em> <em>&lt;reference name&gt;</em>.</p></div>
+<div class="paragraph"><p>The output is in the format:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code>&lt;oid&gt; SP &lt;ref&gt; LF</code></pre>
+</div></div>
+<div class="paragraph"><p>For example,</p></div>
<div class="listingblock">
<div class="content">
<pre><code>$ git show-ref --head --dereference
@@ -898,7 +903,12 @@ the <code>.git</code> directory.</p></div>
423325a2d24638ddcc82ce47be5e40be550f4507 refs/tags/v1.0rc4^{}
...</code></pre>
</div></div>
-<div class="paragraph"><p>When using --hash (and not --dereference) the output format is: <em>&lt;SHA-1 ID&gt;</em></p></div>
+<div class="paragraph"><p>When using <code>--hash</code> (and not <code>--dereference</code>), the output is in the format:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code>&lt;oid&gt; LF</code></pre>
+</div></div>
+<div class="paragraph"><p>For example,</p></div>
<div class="listingblock">
<div class="content">
<pre><code>$ git show-ref --heads --hash
@@ -927,9 +937,9 @@ if such references exists.</p></div>
<pre><code> git show-ref --verify refs/heads/master</code></pre>
</div></div>
<div class="paragraph"><p>will only match the exact branch called "master".</p></div>
-<div class="paragraph"><p>If nothing matches, <em>git show-ref</em> will return an error code of 1,
+<div class="paragraph"><p>If nothing matches, <code>git show-ref</code> will return an error code of 1,
and in the case of verification, it will show an error message.</p></div>
-<div class="paragraph"><p>For scripting, you can ask it to be quiet with the "--quiet" flag, which
+<div class="paragraph"><p>For scripting, you can ask it to be quiet with the <code>--quiet</code> flag, which
allows you to do things like</p></div>
<div class="listingblock">
<div class="content">
@@ -939,10 +949,10 @@ allows you to do things like</p></div>
<div class="paragraph"><p>to check whether a particular branch exists or not (notice how we don&#8217;t
actually want to show any results, and we want to use the full refname for it
in order to not trigger the problem with ambiguous partial matches).</p></div>
-<div class="paragraph"><p>To show only tags, or only proper branch heads, use "--tags" and/or "--heads"
+<div class="paragraph"><p>To show only tags, or only proper branch heads, use <code>--tags</code> and/or <code>--heads</code>
respectively (using both means that it shows tags and heads, but not other
random references under the refs/ subdirectory).</p></div>
-<div class="paragraph"><p>To do automatic tag object dereferencing, use the "-d" or "--dereference"
+<div class="paragraph"><p>To do automatic tag object dereferencing, use the <code>-d</code> or <code>--dereference</code>
flag, so you can do</p></div>
<div class="listingblock">
<div class="content">
@@ -977,7 +987,7 @@ flag, so you can do</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2022-10-29 03:53:56 JST
+ 2023-06-13 13:57:42 PDT
</div>
</div>
</body>