From 0fce211cccd0dce848d217cd4e2037214d7be1dd Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Thu, 9 Dec 2021 05:08:32 +0000 Subject: stash: do not attempt to remove startup_info->original_cwd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since stash spawns a `clean` subprocess, make sure we run that from the startup_info->original_cwd directory, so that the `clean` processs knows to protect that directory. Also, since the `clean` command might no longer run from the toplevel, pass the ':/' magic pathspec to ensure we still clean from the toplevel. Acked-by: Derrick Stolee Acked-by: Ævar Arnfjörð Bjarmason Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- t/t2501-cwd-empty.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't') diff --git a/t/t2501-cwd-empty.sh b/t/t2501-cwd-empty.sh index 52335a8afe..be9ef903bd 100755 --- a/t/t2501-cwd-empty.sh +++ b/t/t2501-cwd-empty.sh @@ -236,7 +236,7 @@ test_expect_success 'clean does not remove cwd incidentally' ' ' test_expect_success 'stash does not remove cwd incidentally' ' - test_incidental_untracked_dir_removal failure \ + test_incidental_untracked_dir_removal success \ git stash --include-untracked ' -- cgit v1.3