From: Emily Shaffer Date: Wed, 22 Dec 2021 03:59:29 +0000 (+0100) Subject: gc: use hook library for pre-auto-gc hook X-Git-Tag: v2.36.0-rc0~174^2~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bad62a8cd5f2394d5c76104f324b0aa8b8c38867;p=thirdparty%2Fgit.git gc: use hook library for pre-auto-gc hook Move the pre-auto-gc hook away from run-command.h to and over to the new hook.h library. This uses the new run_hooks() wrapper. Signed-off-by: Emily Shaffer Signed-off-by: Ævar Arnfjörð Bjarmason Acked-by: Emily Shaffer Signed-off-by: Junio C Hamano --- diff --git a/builtin/gc.c b/builtin/gc.c index bcef6a4c8d..4bbc58aae5 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -32,6 +32,7 @@ #include "remote.h" #include "object-store.h" #include "exec-cmd.h" +#include "hook.h" #define FAILED_RUN "failed to run %s" @@ -394,7 +395,7 @@ static int need_to_gc(void) else return 0; - if (run_hook_le(NULL, "pre-auto-gc", NULL)) + if (run_hooks("pre-auto-gc")) return 0; return 1; }