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-27 10:51:33 -0700
commitd49028e6e7ad02a0fc2622487abc46312d9b42f4 (patch)
tree8233039eeaea8df5d4a359226e8a7ad96a097eba
parent7c0304af62fcb777faac6eebd8c242d3de4f605d (diff)
downloadgit-jc/worktree-config.tar.gz
worktree: honor configuration variablesjc/worktree-config
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)