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

[PATCH] worktree: honor configuration variables

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 27, 2016, 06:49 UTC
Message-ID
<xmqqzimtrg58.fsf@gitster.mtv.corp.google.com>

The command accesses default_abbrev (defined in environment.c and is updated via core.abbrev configuration), but never makes any call to git_config(). The output from "worktree list" ignores the abbrev setting for this reason.

Make a call to git_config() to read the default set of configuration variables at the beginning of the command.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 builtin/worktree.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 6dcf7bd..5c4854d 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -528,6 +528,8 @@ int cmd_worktree(int ac, const char **av, const char *prefix)
 		OPT_END()
 	};
 
+	git_config(git_default_config, NULL);
+
 	if (ac < 2)
 		usage_with_options(worktree_usage, options);
 	if (!prefix)
-- 
2.10.0-561-g98a6b79
Message 1 of 1 in “worktree: honor configuration variables”
  1. worktree: honor configuration variablesJunio C Hamano, Sep 27, 2016

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.