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 <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff --git a/builtin/stash.c b/builtin/stash.c index c4809f2..b19ebd6 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()