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>
Thomas Gummerer committed
Mar 3, 2020 at 17:46 UTC
b0c7362d19a83d45798085f26d98e39c9268e7e5
1 file changed
+2
-3
builtin/stash.c
+2
-3
@@ -712,7 +712,7 @@ static int git_stash_config(const char *var, const char *value, void *cb)
712
show_patch = git_config_bool(var, value);
713
return 0;
714
}
715
- return git_default_config(var, value, cb);
715
+ return git_diff_basic_config(var, value, cb);
716
}
717
718
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)
749
* any options.
750
*/
751
if (revision_args.argc == 1) {
752
- git_config(git_stash_config, NULL);
752
if (show_stat)
753
rev.diffopt.output_format = DIFF_FORMAT_DIFFSTAT;
754
@@ -1573,7 +1572,7 @@ int cmd_stash(int argc, const char **argv, const char *prefix)
1572
trace_repo_setup(prefix);
1573
setup_work_tree();
1574
1576
- git_config(git_diff_basic_config, NULL);
1575
+ git_config(git_stash_config, NULL);
1576
1577
argc = parse_options(argc, argv, prefix, options, git_stash_usage,
1578
PARSE_OPT_KEEP_UNKNOWN | PARSE_OPT_KEEP_DASHDASH);