]> git.ipfire.org Git - thirdparty/git.git/commit - cache.h
read-cache: add post-index-change hook
authorBen Peart <benpeart@microsoft.com>
Fri, 15 Feb 2019 17:59:21 +0000 (12:59 -0500)
committerJunio C Hamano <gitster@pobox.com>
Fri, 15 Feb 2019 19:00:33 +0000 (11:00 -0800)
commit1956ecd0ab26dea9c3ed6b9afe334101d9d12f60
tree730cebe0459631dfcfebc1203300cd5d6c7ae468
parent8989e1950a845ceeb186d490321a4f917ca4de47
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>
Documentation/githooks.txt
builtin/reset.c
builtin/update-index.c
cache.h
read-cache.c
t/t7113-post-index-change-hook.sh [new file with mode: 0755]
unpack-trees.c