aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/stash.c
diff options
context:
space:
mode:
authorD. Ben Knoble <ben.knoble+github@gmail.com>2025-09-21 21:39:05 -0400
committerJunio C Hamano <gitster@pobox.com>2025-09-21 20:23:23 -0700
commit88b5b8d886b54f5020040a3b3a534f7c102a6293 (patch)
treeba50c8da9214ff3871a732939d2e47333cd9eb1e /builtin/stash.c
parentt3905: remove unneeded blank line (diff)
downloadgit-88b5b8d886b54f5020040a3b3a534f7c102a6293.tar.gz
git-88b5b8d886b54f5020040a3b3a534f7c102a6293.zip
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>
Diffstat (limited to 'builtin/stash.c')
-rw-r--r--builtin/stash.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin/stash.c b/builtin/stash.c
index cfbd92852a..d9b478d1d1 100644
--- a/builtin/stash.c
+++ b/builtin/stash.c
@@ -127,6 +127,10 @@ static const char * const git_stash_save_usage[] = {
static const char ref_stash[] = "refs/stash";
static struct strbuf stash_index_path = STRBUF_INIT;
+static int show_stat = 1;
+static int show_patch;
+static int show_include_untracked;
+
/*
* w_commit is set to the commit containing the working tree
* b_commit is set to the base commit
@@ -845,10 +849,6 @@ static int list_stash(int argc, const char **argv, const char *prefix,
return run_command(&cp);
}
-static int show_stat = 1;
-static int show_patch;
-static int show_include_untracked;
-
static int git_stash_config(const char *var, const char *value,
const struct config_context *ctx, void *cb)
{