]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/gc.c
Merge branch 'js/doc-patch-text'
[thirdparty/git.git] / builtin / gc.c
index a22b6ff683465a3addeb059c89775e080197f155..fadb45489f34a760f4c8f6c96c3cc5a5c5c115bd 100644 (file)
@@ -27,6 +27,7 @@
 #include "pack-objects.h"
 #include "blob.h"
 #include "tree.h"
+#include "promisor-remote.h"
 
 #define FAILED_RUN "failed to run %s"
 
@@ -659,7 +660,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
                        argv_array_push(&prune, prune_expire);
                        if (quiet)
                                argv_array_push(&prune, "--no-progress");
-                       if (repository_format_partial_clone)
+                       if (has_promisor_remote())
                                argv_array_push(&prune,
                                                "--exclude-promisor-objects");
                        if (run_command_v_opt(prune.argv, RUN_GIT_CMD))