git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Llilinchao@oschina.cn <lilinchao@oschina.cn>
Date
May 10, 2021, 09:43 UTC
Message-ID
<510425b8b17411eb93770026b95c99cc@oschina.cn>
From: Li Linchao <lilinchao@oschina.cn>

Throw warning message when core.commitGraph is disabled in commit-graph maintenance task.

Signed-off-by: Li Linchao <lilinchao@oschina.cn>
---
 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)) {
-- 
2.31.1.442.g7e39198978
Next: Ævar Arnfjörð Bjarmason
Message 1 of 6 in “builtin/gc: warn when core.commitGraph is disabled”
  1. builtin/gc: warn when core.commitGraph is disabledlilinchao@oschina.cn, May 10, 2021
  2. Ævar Arnfjörð BjarmasonMay 10, 2021
  3. lilinchao@oschina.cnMay 13, 2021
  4. Ævar Arnfjörð BjarmasonMay 13, 2021
  5. Junio C HamanoMay 10, 2021
  6. lilinchao@oschina.cnMay 11, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.