@matheusbsbs / matheus-bagliano / commits / 0dd562e0f7
Fork 0

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>

Denton Liu committed Apr 7, 2020 at 10:28 UTC 0dd562e0f7c0bb9ca64f1a02265ff5d1be86df34
1 file changed +1
sequencer.c
+1
@@ -3748,6 +3748,7 @@ int apply_autostash(const char *path)
3748 " \"git stash drop\" at any time.\n"));
3749 }
3750
3751 + unlink(path);
3752 strbuf_release(&stash_oid);
3753 return ret;
3754 }