[PATCH v4 18/23] sequencer: unlink autostash in apply_autostash()
- From
Denton Liu <liu.denton@gmail.com>
- Date
- Apr 4, 2020, 01:11 UTC
- Message-ID
- <e703022fda836f2fd6856e8d5861e2264af4d038.1585962673.git.liu.denton@gmail.com>
- In-Reply-To
- <cover.1585962672.git.liu.denton@gmail.com>
Explicitly remove autostash file in apply_autostash() once it has been applied successfully.
This is currently a no-op because the only users of this function will unlink the state (including the autostash file) after this function runs. However, in the future, we will introduce a user of the function that does not explicitly remove the state so we do it here.
Signed-off-by: Denton Liu <liu.denton@gmail.com> --- sequencer.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sequencer.c b/sequencer.c index 8efe0976fd..5dd1c2438e 100644 --- a/sequencer.c +++ b/sequencer.c @@ -3740,6 +3740,7 @@ int apply_autostash(const char *path) " \"git stash drop\" at any time.\n")); } + unlink(path); strbuf_release(&stash_oid); return ret; }
-- 2.26.0.159.g23e2136ad0