Convert remaining callers of sha1_object_info_extended to object_id
[gitweb.git] / builtin / gc.c
index 3c5eae0edf12e461e84c71c0e2988fcfa58d3d44..77fa720bd0bf374db8a24338bde8686ee0d60377 100644 (file)
@@ -458,6 +458,9 @@ 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)
+                               argv_array_push(&prune,
+                                               "--exclude-promisor-objects");
                        if (run_command_v_opt(prune.argv, RUN_GIT_CMD))
                                return error(FAILED_RUN, prune.argv[0]);
                }