From: Denton Liu Date: Tue, 7 Apr 2020 14:28:04 +0000 (-0400) Subject: sequencer: unlink autostash in apply_autostash() X-Git-Tag: v2.27.0-rc0~72^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0dd562e0f7c0bb9ca64f1a02265ff5d1be86df34;p=thirdparty%2Fgit.git sequencer: unlink autostash in apply_autostash() 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 Signed-off-by: Junio C Hamano --- diff --git a/sequencer.c b/sequencer.c index e0b8262521..645bc47ce3 100644 --- a/sequencer.c +++ b/sequencer.c @@ -3748,6 +3748,7 @@ int apply_autostash(const char *path) " \"git stash drop\" at any time.\n")); } + unlink(path); strbuf_release(&stash_oid); return ret; }