summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-09-26 23:49:39 -0700
committerJunio C Hamano <gitster@pobox.com>2016-09-29 14:04:26 -0700
commit333fc6db9a70d6ef2d64762e425d176be01b0c4e (patch)
treed4cad66a00ec6a64a86eb3f0b0f6130c48fa725f
parent143b6a5faad5e903bdb7b219846a092f4f629680 (diff)
downloadgit-333fc6db9a70d6ef2d64762e425d176be01b0c4e.tar.gz
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. Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin/worktree.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 6dcf7bd9d2..5c4854d3e4 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)