summaryrefslogtreecommitdiff
path: root/read-cache.c
diff options
context:
space:
mode:
authorLibravatar Emily Shaffer <emilyshaffer@google.com>2021-12-22 04:59:41 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2022-01-07 15:19:35 -0800
commitdbb1c61365baabf4e74c6ef2eee4c4a520056c1d (patch)
treea46cbf90fc97e8a82a3f6c3fe5d76dadf8defb94 /read-cache.c
parentcommit: convert {pre-commit,prepare-commit-msg} hook to hook.h (diff)
downloadtgif-dbb1c61365baabf4e74c6ef2eee4c4a520056c1d.tar.xz
read-cache: convert post-index-change to use hook.h
Move the post-index-change hook away from run-command.h to and over to the new hook.h library. This removes the last direct user of "run_hook_ve()" outside of run-command.c ("run_hook_le()" still uses it). So we can make the function static now. A subsequent commit will remove this code entirely when "run_hook_le()" itself goes away. Signed-off-by: Emily Shaffer <emilyshaffer@google.com> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Acked-by: Emily Shaffer <emilyshaffer@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'read-cache.c')
-rw-r--r--read-cache.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/read-cache.c b/read-cache.c
index cbe73f14e5..a7fbf144fe 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -28,6 +28,7 @@
#include "sparse-index.h"
#include "csum-file.h"
#include "promisor-remote.h"
+#include "hook.h"
/* Mask for the name length in ce_flags in the on-disk index */
@@ -3150,7 +3151,7 @@ static int do_write_locked_index(struct index_state *istate, struct lock_file *l
else
ret = close_lock_file_gently(lock);
- run_hook_le(NULL, "post-index-change",
+ run_hooks_l("post-index-change",
istate->updated_workdir ? "1" : "0",
istate->updated_skipworktree ? "1" : "0", NULL);
istate->updated_workdir = 0;