summaryrefslogtreecommitdiffstats
path: root/githooks.html
diff options
context:
space:
mode:
Diffstat (limited to 'githooks.html')
-rw-r--r--githooks.html15
1 files changed, 9 insertions, 6 deletions
diff --git a/githooks.html b/githooks.html
index 8fe90a7be..8da1704dc 100644
--- a/githooks.html
+++ b/githooks.html
@@ -1171,7 +1171,7 @@ for the user.</p></div>
<div class="paragraph"><p>This hook is invoked by any Git command that performs reference
updates. It executes whenever a reference transaction is prepared,
committed or aborted and may thus get called multiple times. The hook
-does not cover symbolic references (but that may change in the future).</p></div>
+also supports symbolic reference updates.</p></div>
<div class="paragraph"><p>The hook takes exactly one argument, which is the current state the
given reference transaction is in:</p></div>
<div class="ulist"><ul>
@@ -1198,15 +1198,18 @@ given reference transaction is in:</p></div>
receives on standard input a line of the format:</p></div>
<div class="literalblock">
<div class="content">
-<pre><code>&lt;old-oid&gt; SP &lt;new-oid&gt; SP &lt;ref-name&gt; LF</code></pre>
+<pre><code>&lt;old-value&gt; SP &lt;new-value&gt; SP &lt;ref-name&gt; LF</code></pre>
</div></div>
-<div class="paragraph"><p>where <code>&lt;old-oid&gt;</code> is the old object name passed into the reference
-transaction, <code>&lt;new-oid&gt;</code> is the new object name to be stored in the
+<div class="paragraph"><p>where <code>&lt;old-value&gt;</code> is the old object name passed into the reference
+transaction, <code>&lt;new-value&gt;</code> is the new object name to be stored in the
ref and <code>&lt;ref-name&gt;</code> is the full name of the ref. When force updating
the reference regardless of its current value or when the reference is
-to be created anew, <code>&lt;old-oid&gt;</code> is the all-zeroes object name. To
+to be created anew, <code>&lt;old-value&gt;</code> is the all-zeroes object name. To
distinguish these cases, you can inspect the current value of
<code>&lt;ref-name&gt;</code> via <code>git rev-parse</code>.</p></div>
+<div class="paragraph"><p>For symbolic reference updates the <code>&lt;old_value&gt;</code> and <code>&lt;new-value&gt;</code>
+fields could denote references instead of objects. A reference will be
+denoted with a <em>ref:</em> prefix, like <code>ref:&lt;ref-target&gt;</code>.</p></div>
<div class="paragraph"><p>The exit status of the hook is ignored for any state except for the
"prepared" state. In the "prepared" state, a non-zero exit status will
cause the transaction to be aborted. The hook will not be called with
@@ -1442,7 +1445,7 @@ running passing "1", "1" should not be possible.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2024-04-10 12:46:30 PDT
+ 2024-05-23 12:14:58 PDT
</div>
</div>
</body>