Merge branch 'ds/commit-graph-write-refactor'
[gitweb.git] / builtin / gc.c
index 8943bcc300d4a2ce6786857908e189c374373906..8ba9bd247286413c353a1332be0d188b4ae37e47 100644 (file)
@@ -685,9 +685,10 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
                clean_pack_garbage();
        }
 
-       if (gc_write_commit_graph)
-               write_commit_graph_reachable(get_object_directory(), 0,
-                                            !quiet && !daemonized);
+       if (gc_write_commit_graph &&
+           write_commit_graph_reachable(get_object_directory(),
+                                        !quiet && !daemonized ? COMMIT_GRAPH_PROGRESS : 0))
+               return 1;
 
        if (auto_gc && too_many_loose_objects())
                warning(_("There are too many unreachable loose objects; "