Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenton Liu <liu.denton@gmail.com>2020-04-07 17:28:04 +0300
committerJunio C Hamano <gitster@pobox.com>2020-04-10 19:28:02 +0300
commit0dd562e0f7c0bb9ca64f1a02265ff5d1be86df34 (patch)
tree969414946bad0b06e1a68aa5c4244d205d13a3c2 /sequencer.c
parent0816f1dff8715e80b5fa0b73b48dd36ef9e1e381 (diff)
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>
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c1
1 files changed, 1 insertions, 0 deletions
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;
}