summaryrefslogtreecommitdiffstats
path: root/git-show-ref.html
diff options
context:
space:
mode:
Diffstat (limited to 'git-show-ref.html')
-rw-r--r--git-show-ref.html27
1 files changed, 22 insertions, 5 deletions
diff --git a/git-show-ref.html b/git-show-ref.html
index 821b2e20f..d66f9c56a 100644
--- a/git-show-ref.html
+++ b/git-show-ref.html
@@ -749,10 +749,14 @@ git-show-ref(1) Manual Page
<h2 id="_synopsis">SYNOPSIS</h2>
<div class="sectionbody">
<div class="verseblock">
-<pre class="content"><em>git show-ref</em> [-q | --quiet] [--verify] [--head] [-d | --dereference]
+<pre class="content"><em>git show-ref</em> [--head] [-d | --dereference]
[-s | --hash[=&lt;n&gt;]] [--abbrev[=&lt;n&gt;]] [--tags]
[--heads] [--] [&lt;pattern&gt;&#8230;]
-<em>git show-ref</em> --exclude-existing[=&lt;pattern&gt;]</pre>
+<em>git show-ref</em> --verify [-q | --quiet] [-d | --dereference]
+ [-s | --hash[=&lt;n&gt;]] [--abbrev[=&lt;n&gt;]]
+ [--] [&lt;ref&gt;&#8230;]
+<em>git show-ref</em> --exclude-existing[=&lt;pattern&gt;]
+<em>git show-ref</em> --exists &lt;ref&gt;</pre>
<div class="attribution">
</div></div>
</div>
@@ -768,6 +772,9 @@ particular ref exists.</p></div>
<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>The <code>--exists</code> form can be used to check for the existence of a single
+references. This form does not verify whether the reference resolves to an
+actual object.</p></div>
<div class="paragraph"><p>Use of this utility is encouraged in favor of directly accessing files under
the <code>.git</code> directory.</p></div>
</div>
@@ -832,6 +839,16 @@ the <code>.git</code> directory.</p></div>
</p>
</dd>
<dt class="hdlist1">
+--exists
+</dt>
+<dd>
+<p>
+ Check whether the given reference exists. Returns an exit code of 0 if
+ it does, 2 if it is missing, and 1 in case looking up the reference
+ failed with an error other than the reference being missing.
+</p>
+</dd>
+<dt class="hdlist1">
--abbrev[=&lt;n&gt;]
</dt>
<dd>
@@ -848,8 +865,8 @@ the <code>.git</code> directory.</p></div>
</dt>
<dd>
<p>
- Do not print any results to stdout. When combined with <code>--verify</code>, this
- can be used to silently check if a reference exists.
+ Do not print any results to stdout. Can be used with <code>--verify</code> to
+ silently check if a reference exists.
</p>
</dd>
<dt class="hdlist1">
@@ -987,7 +1004,7 @@ flag, so you can do</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-10-24 06:43:46 JST
+ 2023-11-09 02:04:31 JST
</div>
</div>
</body>