general improvements
[gitweb.git] / builtin / gc.c
index 4b8fbb9965c88ae44f88e62aa30e5737d95b1cc8..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))
@@ -686,7 +687,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
        prepare_repo_settings(the_repository);
        if (the_repository->settings.gc_write_commit_graph == 1)
                write_commit_graph_reachable(get_object_directory(),
-                                            !quiet && !daemonized ? COMMIT_GRAPH_PROGRESS : 0,
+                                            !quiet && !daemonized ? COMMIT_GRAPH_WRITE_PROGRESS : 0,
                                             NULL);
 
        if (auto_gc && too_many_loose_objects())