diff options
| author | Emily Shaffer <emilyshaffer@google.com> | 2021-12-22 04:59:29 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-01-07 15:19:34 -0800 |
| commit | bad62a8cd5f2394d5c76104f324b0aa8b8c38867 (patch) | |
| tree | fec8a25fe7dd3290076f82864e741c530a62ff2b | |
| parent | 474c119fda1c323652ccb35124d5c001f48e008a (diff) | |
| download | git-bad62a8cd5f2394d5c76104f324b0aa8b8c38867.tar.xz | |
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 <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>
| -rw-r--r-- | builtin/gc.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |
