diff options
author | Shaoxuan Yuan <shaoxuan.yuan02@gmail.com> | 2022-08-09 15:09:10 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-08-10 23:57:50 +0300 |
commit | da6fe05b3d624ad5b40472eebfe0499c15ecc93d (patch) | |
tree | 13c13771cca4c1ccd6d4fbcf006c504fb90a1d6d /t/t7002-mv-sparse-checkout.sh | |
parent | 5efd533ed8896592740afe22ac07271497d6db36 (diff) |
mv: check overwrite for in-to-out move
Add checking logic for overwriting when moving from in-cone to
out-of-cone. It is the index version of the original overwrite logic.
Helped-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Shaoxuan Yuan <shaoxuan.yuan02@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7002-mv-sparse-checkout.sh')
-rwxr-xr-x | t/t7002-mv-sparse-checkout.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t7002-mv-sparse-checkout.sh b/t/t7002-mv-sparse-checkout.sh index 5e5eb70e7a..26582ae4e5 100755 --- a/t/t7002-mv-sparse-checkout.sh +++ b/t/t7002-mv-sparse-checkout.sh @@ -323,7 +323,7 @@ test_expect_success 'move clean path from in-cone to out-of-cone' ' grep "S folder1/d" actual ' -test_expect_failure 'move clean path from in-cone to out-of-cone overwrite' ' +test_expect_success 'move clean path from in-cone to out-of-cone overwrite' ' test_when_finished "cleanup_sparse_checkout" && setup_sparse_checkout && echo "sub/file1 overwrite" >sub/file1 && @@ -359,7 +359,7 @@ test_expect_failure 'move clean path from in-cone to out-of-cone overwrite' ' # This test is testing the same behavior as the # "move clean path from in-cone to out-of-cone overwrite" above. # The only difference is the <destination> changes from "folder1" to "folder1/file1" -test_expect_failure 'move clean path from in-cone to out-of-cone file overwrite' ' +test_expect_success 'move clean path from in-cone to out-of-cone file overwrite' ' test_when_finished "cleanup_sparse_checkout" && setup_sparse_checkout && echo "sub/file1 overwrite" >sub/file1 && @@ -392,7 +392,7 @@ test_expect_failure 'move clean path from in-cone to out-of-cone file overwrite' test_cmp expect actual ' -test_expect_failure 'move directory with one of the files overwrite' ' +test_expect_success 'move directory with one of the files overwrite' ' test_when_finished "cleanup_sparse_checkout" && mkdir -p folder1/dir && touch folder1/dir/file1 && |