summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorThomas Gummerer <t.gummerer@gmail.com>2020-03-03 17:46:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-03-03 21:18:44 (GMT)
commitb0c7362d19a83d45798085f26d98e39c9268e7e5 (patch)
tree1aa10d0de9037687c9d324bef241a7aed9dba172 /builtin
parent2d2118b814c11f509e1aa76cb07110f7231668dc (diff)
downloadgit-b0c7362d19a83d45798085f26d98e39c9268e7e5.zip
git-b0c7362d19a83d45798085f26d98e39c9268e7e5.tar.gz
git-b0c7362d19a83d45798085f26d98e39c9268e7e5.tar.bz2
stash: get git_stash_config at the top level
In the next commit we're adding another config variable to be read from 'git_stash_config', that is valid for the top level command instead of just a subset. Move the 'git_config' invocation for 'git_stash_config' to the top-level to prepare for that. Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/stash.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/builtin/stash.c b/builtin/stash.c
index 879fc5f..f371db2 100644
--- a/builtin/stash.c
+++ b/builtin/stash.c
@@ -712,7 +712,7 @@ static int git_stash_config(const char *var, const char *value, void *cb)
show_patch = git_config_bool(var, value);
return 0;
}
- return git_default_config(var, value, cb);
+ return git_diff_basic_config(var, value, cb);
}
static int show_stash(int argc, const char **argv, const char *prefix)
@@ -749,7 +749,6 @@ static int show_stash(int argc, const char **argv, const char *prefix)
* any options.
*/
if (revision_args.argc == 1) {
- git_config(git_stash_config, NULL);
if (show_stat)
rev.diffopt.output_format = DIFF_FORMAT_DIFFSTAT;
@@ -1573,7 +1572,7 @@ int cmd_stash(int argc, const char **argv, const char *prefix)
trace_repo_setup(prefix);
setup_work_tree();
- git_config(git_diff_basic_config, NULL);
+ git_config(git_stash_config, NULL);
argc = parse_options(argc, argv, prefix, options, git_stash_usage,
PARSE_OPT_KEEP_UNKNOWN | PARSE_OPT_KEEP_DASHDASH);