stash: refactor private config globals

A subsequent commit will access a new config variable in the stash subcommand implementations, which requires the variables to be declared before the relevant functions. Prep with a pure refactoring change to consolidate config-related globals with the rest of the globals. Best-viewed-with: --color-moved Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

D. Ben Knoble committed Sep 21, 2025 at 21:39 UTC 88b5b8d886b54f5020040a3b3a534f7c102a6293
1 file changed +4 -4
builtin/stash.c
+4 -4
@@ -127,6 +127,10 @@ static const char * const git_stash_save_usage[] = {
127 static const char ref_stash[] = "refs/stash";
128 static struct strbuf stash_index_path = STRBUF_INIT;
129
130 +static int show_stat = 1;
131 +static int show_patch;
132 +static int show_include_untracked;
133 +
134 /*
135 * w_commit is set to the commit containing the working tree
136 * b_commit is set to the base commit
@@ -845,10 +849,6 @@ static int list_stash(int argc, const char **argv, const char *prefix,
849 return run_command(&cp);
850 }
851
848 -static int show_stat = 1;
849 -static int show_patch;
850 -static int show_include_untracked;
851 -
852 static int git_stash_config(const char *var, const char *value,
853 const struct config_context *ctx, void *cb)
854 {