path: root/builtin/gc.c
diff options
authorÆvar Arnfjörð Bjarmason <>2018-09-19 21:01:38 (GMT)
committerJunio C Hamano <>2018-09-20 19:25:05 (GMT)
commit6b89a34c89fc763292f06012318b852b74825619 (patch)
tree3cdafdcd2fe60a89e6affa786221d507a39ef574 /builtin/gc.c
parent1f7f557fd3eca251b1b14fa8240e1a12597c8730 (diff)
gc: fix regression in 7b0f229222 impacting --quiet
Fix a regression in my recent 7b0f229222 ("commit-graph write: add progress output", 2018-09-17). The newly added progress output for "commit-graph write" didn't check the --quiet option. Do so, and add a test asserting that this works as expected. Since the TTY prequisite isn't available everywhere let's add a version of this that both requires and doesn't require that. This test might be overly specific and will break if new progress output is added, but I think it'll serve as a good reminder to test the undertested progress mode(s). Signed-off-by: Ævar Arnfjörð Bjarmason <> Helped-by: Martin Ågren <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'builtin/gc.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/gc.c b/builtin/gc.c
index 06ddd3a..91ffb1a 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -647,7 +647,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
if (gc_write_commit_graph)
write_commit_graph_reachable(get_object_directory(), 0,
- !daemonized);
+ !quiet && !daemonized);
if (auto_gc && too_many_loose_objects())
warning(_("There are too many unreachable loose objects; "