Skip to content

Commit

Permalink
Add documentation for the post-indexchanged hook
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Willford authored and dscho committed Dec 15, 2018
1 parent 5e37040 commit 66887e1
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Documentation/githooks.txt
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,24 @@ of the working directory and are separated by a single NUL. Full paths
The exit status determines whether git will use the data from the
hook. On error, git will abort the command with an error message.

post-indexchanged
~~~~~~~~~~~~~~~~~

This hook is invoked when the index is written in read-cache.c
do_write_locked_index.

The first parameter passed to the hook is the indicator for the
working directory being updated. "1" meaning working directory
was updated or "0" when the working directory was not updated.

The second parameter passed to the hook is the indicator for whether
or not the index was updated and the skip-worktree bit could have
changed. "1" meaning skip-worktree bits could have been updated
and "0" meaning they were not.

Only one parameter should be set to "1" when the hook runs. The hook
running passing "1", "1" should not be possible.

GIT
---
Part of the linkgit:git[1] suite

0 comments on commit 66887e1

Please sign in to comment.