summaryrefslogtreecommitdiff
path: root/t/t7607-merge-overwrite.sh
diff options
context:
space:
mode:
authorClemens Buchacher <drizzd@aon.at>2010-10-09 13:53:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-10-13 21:34:09 (GMT)
commitf66caaf9c8e0feb840a439a58e165b963aec79cf (patch)
tree0c0f99ba5a023b7330b949045ba188e3a7cc1fde /t/t7607-merge-overwrite.sh
parent4856ff2a195e558c82ca3cab636c4d4fbef148e3 (diff)
downloadgit-f66caaf9c8e0feb840a439a58e165b963aec79cf.zip
git-f66caaf9c8e0feb840a439a58e165b963aec79cf.tar.gz
git-f66caaf9c8e0feb840a439a58e165b963aec79cf.tar.bz2
do not overwrite files in leading path
If the work tree contains an untracked file x, and unpack-trees wants to checkout a path x/*, the file x is removed unconditionally. Instead, apply the same checks that are normally used for untracked files, and abort if the file cannot be removed. Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Diffstat (limited to 't/t7607-merge-overwrite.sh')
-rwxr-xr-xt/t7607-merge-overwrite.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t7607-merge-overwrite.sh b/t/t7607-merge-overwrite.sh
index 77fcaa2..e49dd80 100755
--- a/t/t7607-merge-overwrite.sh
+++ b/t/t7607-merge-overwrite.sh
@@ -100,7 +100,7 @@ test_expect_success 'will not overwrite untracked subtree' '
test_cmp important sub/f/important
'
-test_expect_failure 'will not overwrite untracked file in leading path' '
+test_expect_success 'will not overwrite untracked file in leading path' '
git reset --hard c0 &&
rm -rf sub &&
cp important sub &&