Skip to content

Commit 2f1757e

Browse files
committed
Merge branch 'jc/post-checkout-doc'
Doc update. * jc/post-checkout-doc: doc: clarify how exit status of post-checkout hook is used
2 parents ed9d833 + 3100fd5 commit 2f1757e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Documentation/githooks.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,9 @@ worktree. The hook is given three parameters: the ref of the previous HEAD,
193193
the ref of the new HEAD (which may or may not have changed), and a flag
194194
indicating whether the checkout was a branch checkout (changing branches,
195195
flag=1) or a file checkout (retrieving a file from the index, flag=0).
196-
This hook cannot affect the outcome of `git switch` or `git checkout`.
196+
This hook cannot affect the outcome of `git switch` or `git checkout`,
197+
other than that the hook's exit status becomes the exit status of
198+
these two commands.
197199

198200
It is also run after linkgit:git-clone[1], unless the `--no-checkout` (`-n`) option is
199201
used. The first parameter given to the hook is the null-ref, the second the

0 commit comments

Comments
 (0)