diff options
author | Ben Peart <benpeart@microsoft.com> | 2019-02-15 18:59:21 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-02-15 20:00:33 +0100 |
commit | 1956ecd0ab26dea9c3ed6b9afe334101d9d12f60 (patch) | |
tree | 730cebe0459631dfcfebc1203300cd5d6c7ae468 /cache.h | |
parent | Git 2.21-rc1 (diff) | |
download | git-1956ecd0ab26dea9c3ed6b9afe334101d9d12f60.tar.xz git-1956ecd0ab26dea9c3ed6b9afe334101d9d12f60.zip |
read-cache: add post-index-change hook
Add a post-index-change hook that is invoked after the index is written in
do_write_locked_index().
This hook is meant primarily for notification, and cannot affect
the outcome of git commands that trigger the index write.
The hook is passed a flag to indicate whether the working directory was
updated or not and a flag indicating if a skip-worktree bit could have
changed. These flags enable the hook to optimize its response to the
index change notification.
Signed-off-by: Ben Peart <benpeart@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -338,7 +338,9 @@ struct index_state { struct cache_time timestamp; unsigned name_hash_initialized : 1, initialized : 1, - drop_cache_tree : 1; + drop_cache_tree : 1, + updated_workdir : 1, + updated_skipworktree : 1; struct hashmap name_hash; struct hashmap dir_hash; struct object_id oid; |