Thread (1 message) 1 message, 1 author, 2021-05-10

Re: [PATCH] builtin/gc: warn when core.commitGraph is disabled

From: Junio C Hamano <hidden>
Date: 2021-05-10 18:12:47

lilinchao@oschina.cn writes:
From: Li Linchao <redacted>

Throw warning message when core.commitGraph is disabled in commit-graph
maintenance task.
Why?  If I said, with core.commitGraph, that I do not want to have
anything to do with commitGraph, why should I get disturbed with
such a warning message?

quoted hunk
Signed-off-by: Li Linchao <redacted>
---
 builtin/gc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/builtin/gc.c b/builtin/gc.c
index 98a803196b..90684ca3b3 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -861,8 +861,10 @@ static int run_write_commit_graph(struct maintenance_run_opts *opts)
 static int maintenance_task_commit_graph(struct maintenance_run_opts *opts)
 {
 	prepare_repo_settings(the_repository);
-	if (!the_repository->settings.core_commit_graph)
+	if (!the_repository->settings.core_commit_graph) {
+		warning(_("skipping commit-graph task because core.commitGraph is disabled"));
 		return 0;
+	}
 
 	close_object_store(the_repository->objects);
 	if (run_write_commit_graph(opts)) {
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help