]> git.ipfire.org Git - thirdparty/git.git/commit
stash: do not attempt to remove startup_info->original_cwd
authorElijah Newren <newren@gmail.com>
Thu, 9 Dec 2021 05:08:32 +0000 (05:08 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 9 Dec 2021 21:33:13 +0000 (13:33 -0800)
commit0fce211cccd0dce848d217cd4e2037214d7be1dd
tree20b5405c6a8694250cb284056987b1856479ba77
parentbc3ae46b420f58dfe2bfd87714dca096a043d554
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>
builtin/stash.c
t/t2501-cwd-empty.sh