summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2019-04-25 16:41:10 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-04-25 16:41:11 +0900
commit5795a75f9bd7a7f008b213c2f099e8c6b0468512 (patch)
treeed5f85921947bfcdd9dd7a8003c9760e5c0cc0c7 /Documentation
parentThe sixth batch (diff)
parentread-cache: add post-index-change hook (diff)
downloadtgif-5795a75f9bd7a7f008b213c2f099e8c6b0468512.tar.xz
Merge branch 'bp/post-index-change-hook'
A new hook "post-index-change" is called when the on-disk index file changes, which can help e.g. a virtualized working tree implementation. * bp/post-index-change-hook: read-cache: add post-index-change hook
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/githooks.txt18
1 files changed, 18 insertions, 0 deletions
diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt
index 5bf653c111..786e778ab8 100644
--- a/Documentation/githooks.txt
+++ b/Documentation/githooks.txt
@@ -496,6 +496,24 @@ This hook is invoked by `git-p4 submit`. It takes no parameters and nothing
from standard input. Exiting with non-zero status from this script prevent
`git-p4 submit` from launching. Run `git-p4 submit --help` for details.
+post-index-change
+~~~~~~~~~~~~~~~~~
+
+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