diff options
author | Josh England <jjengla@sandia.gov> | 2007-09-26 15:31:01 -0600 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-09-29 21:11:21 -0700 |
commit | 1abbe475ff17349839f72a024cf665b8ec86473f (patch) | |
tree | 19b2213ce48607549de06689c43f31a581a6e41c /Documentation/hooks.txt | |
parent | 2a858ee95134926a0ccccb9a78db06bcb0bd65d0 (diff) | |
download | git-1abbe475ff17349839f72a024cf665b8ec86473f.tar.gz |
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.txt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Documentation/hooks.txt b/Documentation/hooks.txt index 58b9547596..f110162b01 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 ----------- |