Thread (128 messages) 128 messages, 3 authors, 2020-04-10
STALE2273d
Revisions (4)
  1. v2 [diff vs current]
  2. v3 current
  3. v4 [diff vs current]
  4. v5 [diff vs current]

[PATCH v3 15/19] sequencer: unlink autostash in apply_autostash()

From: Denton Liu <hidden>
Date: 2020-03-21 09:22:39
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 sequencer.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/sequencer.c b/sequencer.c
index b2951843a1..81b6c700d1 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -3746,6 +3746,7 @@ int apply_autostash(const char *path)
 				  " \"git stash drop\" at any time.\n"));
 	}
 
+	unlink(path);
 	strbuf_release(&stash_sha1);
 	return ret;
 }
-- 
2.25.0.114.g5b0ca878e0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help