summaryrefslogtreecommitdiffstats
path: root/githooks.html
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-07-09 19:54:04 -0700
committerJunio C Hamano <gitster@pobox.com>2019-07-09 19:54:04 -0700
commitc9f11c2b3a739e3e249b9e7711bf1ed76ef3c6db (patch)
tree06ddfc72dff8e370e395a3acc692c8ab48147227 /githooks.html
parentd0a9940c76b71c9df840a098a423d3400779d83c (diff)
downloadgit-htmldocs-c9f11c2b3a739e3e249b9e7711bf1ed76ef3c6db.tar.gz
Autogenerated HTML docs for v2.22.0-428-g6d5b2
Diffstat (limited to 'githooks.html')
-rw-r--r--githooks.html10
1 files changed, 6 insertions, 4 deletions
diff --git a/githooks.html b/githooks.html
index ccac845e6..0dc0c2886 100644
--- a/githooks.html
+++ b/githooks.html
@@ -877,12 +877,13 @@ rebased, and is not set when rebasing the current branch.</p></div>
</div>
<div class="sect2">
<h3 id="_post_checkout">post-checkout</h3>
-<div class="paragraph"><p>This hook is invoked when a <a href="git-checkout.html">git-checkout(1)</a> is run after having updated the
+<div class="paragraph"><p>This hook is invoked when a <a href="git-checkout.html">git-checkout(1)</a> or
+<a href="git-switch.html">git-switch(1)</a> is run after having updated the
worktree. The hook is given three parameters: the ref of the previous HEAD,
the ref of the new HEAD (which may or may not have changed), and a flag
indicating whether the checkout was a branch checkout (changing branches,
flag=1) or a file checkout (retrieving a file from the index, flag=0).
-This hook cannot affect the outcome of <code>git checkout</code>.</p></div>
+This hook cannot affect the outcome of <code>git switch</code> or <code>git checkout</code>.</p></div>
<div class="paragraph"><p>It is also run after <a href="git-clone.html">git-clone(1)</a>, unless the <code>--no-checkout</code> (<code>-n</code>) option is
used. The first parameter given to the hook is the null-ref, the second the
ref of the new HEAD and the flag is always 1. Likewise for <code>git worktree add</code>
@@ -1093,7 +1094,8 @@ exit with a zero status.</p></div>
<div class="paragraph"><p>For example, the hook can simply run <code>git read-tree -u -m HEAD "$1"</code>
in order to emulate <code>git fetch</code> that is run in the reverse direction
with <code>git push</code>, as the two-tree form of <code>git read-tree -u -m</code> is
-essentially the same as <code>git checkout</code> that switches branches while
+essentially the same as <code>git switch</code> or <code>git checkout</code>
+that switches branches while
keeping the local changes in the working tree that do not interfere
with the difference between the branches.</p></div>
</div>
@@ -1203,7 +1205,7 @@ running passing "1", "1" should not be possible.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2019-04-25 03:09:28 PDT
+ 2019-07-09 19:51:04 PDT
</div>
</div>
</body>