Merge branch 'rh/prompt-pcmode-avoid-eval-on-refname' into maint
[gitweb.git] / builtin / gc.c
index 25f2237c08f3b8fbc8f3554f3e22bf7e59e74b1c..7fa717a3b6ab08bb5b4d5549eeb96f07460f95e6 100644 (file)
@@ -16,6 +16,7 @@
 #include "run-command.h"
 #include "sigchain.h"
 #include "argv-array.h"
+#include "commit.h"
 
 #define FAILED_RUN "failed to run %s"
 
@@ -178,7 +179,7 @@ static int need_to_gc(void)
        else if (!too_many_loose_objects())
                return 0;
 
-       if (run_hook(NULL, "pre-auto-gc", NULL))
+       if (run_hook_le(NULL, "pre-auto-gc", NULL))
                return 0;
        return 1;
 }