Skip to content

Commit bad62a8

Browse files
nasamuffingitster
authored andcommitted
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 <[email protected]> Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Acked-by: Emily Shaffer <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 474c119 commit bad62a8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

builtin/gc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include "remote.h"
3333
#include "object-store.h"
3434
#include "exec-cmd.h"
35+
#include "hook.h"
3536

3637
#define FAILED_RUN "failed to run %s"
3738

@@ -394,7 +395,7 @@ static int need_to_gc(void)
394395
else
395396
return 0;
396397

397-
if (run_hook_le(NULL, "pre-auto-gc", NULL))
398+
if (run_hooks("pre-auto-gc"))
398399
return 0;
399400
return 1;
400401
}

0 commit comments

Comments
 (0)