Skip to contentSkip to conversation

worktree: honor configuration variables

PATCH New Junio C Hamano 1 participant 1 message Sep 27, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 worktree: honor configuration variables

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.

---
 builtin/worktree.c | 2 ++
 1 file changed, 2 insertions(+)
builtin/worktree.c +2 -0
index 6dcf7bd..5c4854d 100644
@@ -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)
Signature · 1 line
2.10.0-561-g98a6b79