From 1abbe475ff17349839f72a024cf665b8ec86473f Mon Sep 17 00:00:00 2001 From: Josh England Date: Wed, 26 Sep 2007 15:31:01 -0600 Subject: 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 Signed-off-by: Junio C Hamano --- Documentation/hooks.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Documentation/hooks.txt') 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 ----------- -- cgit v1.2.3