aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorClemens Buchacher <drizzd@aon.at>2010-10-09 15:53:00 +0200
committerJunio C Hamano <gitster@pobox.com>2010-12-14 08:55:12 -0800
commitb1735b1ab7743700064af528a998cdc952c8b9a1 (patch)
tree6b2b26f56f394b0f2de5d1242476b65cc68c7d41 /t
parentf7e3bd37fb9355ee036da4cf11d6e8186b506d5f (diff)
downloadgit-b1735b1ab7743700064af528a998cdc952c8b9a1.tar.gz
git-b1735b1ab7743700064af528a998cdc952c8b9a1.tar.xz
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-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 f8e8ff0b6..d4a499dee 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 &&