summaryrefslogtreecommitdiff
path: root/unpack-trees.h
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2021-12-09 05:08:27 +0000
committerJunio C Hamano <gitster@pobox.com>2021-12-09 13:33:12 -0800
commitb817e545338cdb737b3deebf4917afb4a18ede57 (patch)
treec8e6a6039201162361e9919bfe0f4a6480db3ca0 /unpack-trees.h
parente6f8861bd43636b27651150e6a3caa0a937fb418 (diff)
downloadgit-b817e545338cdb737b3deebf4917afb4a18ede57.tar.gz
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>
Diffstat (limited to 'unpack-trees.h')
-rw-r--r--unpack-trees.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/unpack-trees.h b/unpack-trees.h
index 71ffb7eeb0..efb9edfbb2 100644
--- a/unpack-trees.h
+++ b/unpack-trees.h
@@ -19,6 +19,7 @@ enum unpack_trees_error_types {
ERROR_WOULD_OVERWRITE = 0,
ERROR_NOT_UPTODATE_FILE,
ERROR_NOT_UPTODATE_DIR,
+ ERROR_CWD_IN_THE_WAY,
ERROR_WOULD_LOSE_UNTRACKED_OVERWRITTEN,
ERROR_WOULD_LOSE_UNTRACKED_REMOVED,
ERROR_BIND_OVERLAP,