1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-28 02:16:29 +02:00

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 <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Denton Liu 2020-04-07 10:28:04 -04:00 committed by Junio C Hamano
parent 0816f1dff8
commit 0dd562e0f7

View File

@ -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;
}