Skip to content

Commit b0c7362

Browse files
tgummerergitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2d2118b commit b0c7362

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

builtin/stash.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ static int git_stash_config(const char *var, const char *value, void *cb)
712712
show_patch = git_config_bool(var, value);
713713
return 0;
714714
}
715-
return git_default_config(var, value, cb);
715+
return git_diff_basic_config(var, value, cb);
716716
}
717717

718718
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)
749749
* any options.
750750
*/
751751
if (revision_args.argc == 1) {
752-
git_config(git_stash_config, NULL);
753752
if (show_stat)
754753
rev.diffopt.output_format = DIFF_FORMAT_DIFFSTAT;
755754

@@ -1573,7 +1572,7 @@ int cmd_stash(int argc, const char **argv, const char *prefix)
15731572
trace_repo_setup(prefix);
15741573
setup_work_tree();
15751574

1576-
git_config(git_diff_basic_config, NULL);
1575+
git_config(git_stash_config, NULL);
15771576

15781577
argc = parse_options(argc, argv, prefix, options, git_stash_usage,
15791578
PARSE_OPT_KEEP_UNKNOWN | PARSE_OPT_KEEP_DASHDASH);

0 commit comments

Comments
 (0)