]> git.ipfire.org Git - thirdparty/git.git/commit
unpack-trees: refuse to remove startup_info->original_cwd
authorElijah Newren <newren@gmail.com>
Thu, 9 Dec 2021 05:08:27 +0000 (05:08 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 9 Dec 2021 21:33:12 +0000 (13:33 -0800)
commitb817e545338cdb737b3deebf4917afb4a18ede57
treec8e6a6039201162361e9919bfe0f4a6480db3ca0
parente6f8861bd43636b27651150e6a3caa0a937fb418
unpack-trees: refuse to remove startup_info->original_cwd

In the past, when a directory needs to be removed to make room for a
file, we have always errored out when that directory contains any
untracked (but not ignored) files.  Add an extra condition on that: also
error out if the directory is the current working directory we inherited
from our parent process.

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>
t/t2501-cwd-empty.sh
unpack-trees.c
unpack-trees.h