summaryrefslogtreecommitdiff
path: root/Documentation/hooks.txt
diff options
context:
space:
mode:
authorJosh England <jjengla@sandia.gov>2007-09-26 21:31:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-09-30 04:11:21 (GMT)
commit1abbe475ff17349839f72a024cf665b8ec86473f (patch)
tree19b2213ce48607549de06689c43f31a581a6e41c /Documentation/hooks.txt
parent2a858ee95134926a0ccccb9a78db06bcb0bd65d0 (diff)
downloadgit-1abbe475ff17349839f72a024cf665b8ec86473f.zip
git-1abbe475ff17349839f72a024cf665b8ec86473f.tar.gz
git-1abbe475ff17349839f72a024cf665b8ec86473f.tar.bz2
post-checkout hook, tests, and docs
Updated post-checkout hook to take a flag specifying whether the checkout is a branch checkout or a file checkout (from the index). Signed-off-by: Josh England <jjengla@sandia.gov> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/hooks.txt')
-rw-r--r--Documentation/hooks.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/Documentation/hooks.txt b/Documentation/hooks.txt
index 58b9547..f110162 100644
--- a/Documentation/hooks.txt
+++ b/Documentation/hooks.txt
@@ -87,6 +87,20 @@ parameter, and is invoked after a commit is made.
This hook is meant primarily for notification, and cannot affect
the outcome of `git-commit`.
+post-checkout
+-----------
+
+This hook is invoked when a `git-checkout` 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 `git-checkout`.
+
+This hook can be used to perform repository validity checks, auto-display
+differences from the previous HEAD if different, or set working dir metadata
+properties.
+
post-merge
-----------