diff options
Diffstat (limited to 'githooks.html')
-rw-r--r-- | githooks.html | 15 |
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><old-oid> SP <new-oid> SP <ref-name> LF</code></pre>
+<pre><code><old-value> SP <new-value> SP <ref-name> LF</code></pre>
</div></div>
-<div class="paragraph"><p>where <code><old-oid></code> is the old object name passed into the reference
-transaction, <code><new-oid></code> is the new object name to be stored in the
+<div class="paragraph"><p>where <code><old-value></code> is the old object name passed into the reference
+transaction, <code><new-value></code> is the new object name to be stored in the
ref and <code><ref-name></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><old-oid></code> is the all-zeroes object name. To
+to be created anew, <code><old-value></code> is the all-zeroes object name. To
distinguish these cases, you can inspect the current value of
<code><ref-name></code> via <code>git rev-parse</code>.</p></div>
+<div class="paragraph"><p>For symbolic reference updates the <code><old_value></code> and <code><new-value></code>
+fields could denote references instead of objects. A reference will be
+denoted with a <em>ref:</em> prefix, like <code>ref:<ref-target></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>
|