From 28699cf58187fbfb367fcb02d337e93cac9e79e4 Mon Sep 17 00:00:00 2001 From: Phillip Wood Date: Sun, 4 Oct 2026 11:05:52 +0100 Subject: [PATCH] stash: use named constant when parsing "--all" The code that stashes all untracked files compares the value of the "include_untracked" variable to the constant "INCLUDE_ALL_FILES", however the option parsing code for "--all" uses a hard coded integer instead. Replace the integer with the named constant. Signed-off-by: Phillip Wood Signed-off-by: Junio C Hamano --- builtin/stash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/stash.c b/builtin/stash.c index c4809f299a..b19ebd611f 100644 --- a/builtin/stash.c +++ b/builtin/stash.c @@ -1929,7 +1929,7 @@ static int push_stash(int argc, const char **argv, const char *prefix, OPT_BOOL('u', "include-untracked", &include_untracked, N_("include untracked files in stash")), OPT_SET_INT('a', "all", &include_untracked, - N_("include ignore files"), 2), + N_("include ignore files"), INCLUDE_ALL_FILES), OPT_STRING('m', "message", &stash_msg, N_("message"), N_("stash message")), OPT_PATHSPEC_FROM_FILE(&pathspec_from_file), @@ -2036,7 +2036,7 @@ static int save_stash(int argc, const char **argv, const char *prefix, OPT_BOOL('u', "include-untracked", &include_untracked, N_("include untracked files in stash")), OPT_SET_INT('a', "all", &include_untracked, - N_("include ignore files"), 2), + N_("include ignore files"), INCLUDE_ALL_FILES), OPT_STRING('m', "message", &stash_msg, "message", N_("stash message")), OPT_END()