[PATCH v3 6/6] stash: remove `stash_index_path'
- From
Alban Gruin <alban.gruin@gmail.com>
- Date
- Jul 31, 2020, 16:51 UTC
- Message-ID
- <20200731165140.29197-7-alban.gruin@gmail.com>
- In-Reply-To
- <20200731165140.29197-1-alban.gruin@gmail.com>
Since stash no longer uses a second index, `stash_index_path' is now unused, and can be dropped.
Signed-off-by: Alban Gruin <alban.gruin@gmail.com> --- builtin/stash.c | 7 ------- 1 file changed, 7 deletions(-)
diff --git a/builtin/stash.c b/builtin/stash.c index d5077a27d9..f1b3c0d2f8 100644 --- a/builtin/stash.c +++ b/builtin/stash.c @@ -88,7 +88,6 @@ static const char * const git_stash_save_usage[] = { }; static const char *ref_stash = "refs/stash"; -static struct strbuf stash_index_path = STRBUF_INIT; /* * w_commit is set to the commit containing the working tree @@ -1505,8 +1504,6 @@ static int save_stash(int argc, const char **argv, const char *prefix) int cmd_stash(int argc, const char **argv, const char *prefix) { - pid_t pid = getpid(); - const char *index_file; struct argv_array args = ARGV_ARRAY_INIT; struct option options[] = { @@ -1523,10 +1520,6 @@ int cmd_stash(int argc, const char **argv, const char *prefix) argc = parse_options(argc, argv, prefix, options, git_stash_usage, PARSE_OPT_KEEP_UNKNOWN | PARSE_OPT_KEEP_DASHDASH); - index_file = get_index_file(); - strbuf_addf(&stash_index_path, "%s.stash.%" PRIuMAX, index_file, - (uintmax_t)pid); - if (!argc) return !!push_stash(0, NULL, prefix, 0); else if (!strcmp(argv[0], "apply"))
-- 2.20.1