summaryrefslogtreecommitdiff
path: root/builtin/gc.c
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2019-06-12 13:29:38 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-06-12 18:20:53 (GMT)
commit5af803945212af875670582ff153ee05ec368b83 (patch)
tree8bb9b6ccb72fc7f8024428991eabf07c31554f68 /builtin/gc.c
parente103f7276f0d809c2935ebc1a3d68c6bbfaed23d (diff)
downloadgit-5af803945212af875670582ff153ee05ec368b83.zip
git-5af803945212af875670582ff153ee05ec368b83.tar.gz
git-5af803945212af875670582ff153ee05ec368b83.tar.bz2
commit-graph: collapse parameters into flags
The write_commit_graph() and write_commit_graph_reachable() methods currently take two boolean parameters: 'append' and 'report_progress'. As we update these methods, adding more parameters this way becomes cluttered and hard to maintain. Collapse these parameters into a 'flags' parameter, and adjust the callers to provide flags as necessary. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/gc.c')
-rw-r--r--builtin/gc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/gc.c b/builtin/gc.c
index 3984add..df2573f 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -665,8 +665,8 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
}
if (gc_write_commit_graph &&
- write_commit_graph_reachable(get_object_directory(), 0,
- !quiet && !daemonized))
+ write_commit_graph_reachable(get_object_directory(),
+ !quiet && !daemonized ? COMMIT_GRAPH_PROGRESS : 0))
return 1;
if (auto_gc && too_many_loose_objects())