diff options
author | Elijah Newren <newren@gmail.com> | 2021-12-09 05:08:32 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-12-09 21:33:13 (GMT) |
commit | 0fce211cccd0dce848d217cd4e2037214d7be1dd (patch) | |
tree | 20b5405c6a8694250cb284056987b1856479ba77 /t/t2501-cwd-empty.sh | |
parent | bc3ae46b420f58dfe2bfd87714dca096a043d554 (diff) | |
download | git-0fce211cccd0dce848d217cd4e2037214d7be1dd.zip git-0fce211cccd0dce848d217cd4e2037214d7be1dd.tar.gz git-0fce211cccd0dce848d217cd4e2037214d7be1dd.tar.bz2 |
stash: do not attempt to remove startup_info->original_cwd
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 <stolee@gmail.com>
Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t2501-cwd-empty.sh')
-rwxr-xr-x | t/t2501-cwd-empty.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t2501-cwd-empty.sh b/t/t2501-cwd-empty.sh index 52335a8..be9ef90 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 ' |