Skip to content

Commit 88b5b8d

Browse files
benknoblegitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4b2de83 commit 88b5b8d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

builtin/stash.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ static const char * const git_stash_save_usage[] = {
127127
static const char ref_stash[] = "refs/stash";
128128
static struct strbuf stash_index_path = STRBUF_INIT;
129129

130+
static int show_stat = 1;
131+
static int show_patch;
132+
static int show_include_untracked;
133+
130134
/*
131135
* w_commit is set to the commit containing the working tree
132136
* b_commit is set to the base commit
@@ -845,10 +849,6 @@ static int list_stash(int argc, const char **argv, const char *prefix,
845849
return run_command(&cp);
846850
}
847851

848-
static int show_stat = 1;
849-
static int show_patch;
850-
static int show_include_untracked;
851-
852852
static int git_stash_config(const char *var, const char *value,
853853
const struct config_context *ctx, void *cb)
854854
{

0 commit comments

Comments
 (0)