From: Elijah Newren Date: Fri, 09 Jul 2010 13:10:52 GMT Subject: [PATCHv4 2/6] Add a rename + D/F conflict testcase Message-ID: <1278681056-31460-3-git-send-email-newren@gmail.com> In-Reply-To: <1278681056-31460-1-git-send-email-newren@gmail.com> From: Alexander Gladysh This is a simple testcase where both sides of the rename are paths involved in (separate) D/F merge conflicts Signed-off-by: Alexander Gladysh Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- Junio was also curious in the last round how well the resolve strategy handled this testcase. It passes. I could add it as a testcase, but use of the --strategy option for cherry-pick would make the series no longer apply to maint. However, if that is wanted, I can add it. t/t3509-cherry-pick-merge-df.sh | 35 +++++++++++++++++++++++++++++++++++ 1 files changed, 35 insertions(+), 0 deletions(-) create mode 100755 t/t3509-cherry-pick-merge-df.sh diff --git a/t/t3509-cherry-pick-merge-df.sh b/t/t3509-cherry-pick-merge-df.sh new file mode 100755 index 0000000..7c05e16 --- /dev/null +++ b/t/t3509-cherry-pick-merge-df.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +test_description='Test cherry-pick with directory/file conflicts' +. ./test-lib.sh + +test_expect_success 'Setup rename across paths each below D/F conflicts' ' + mkdir a && + >a/f && + git add a && + git commit -m a && + + mkdir b && + ln -s ../a b/a && + git add b && + git commit -m b && + + git checkout -b branch && + rm b/a && + mv a b/a && + ln -s b/a a && + git add . && + git commit -m swap && + + >f1 && + git add f1 && + git commit -m f1 +' + +test_expect_failure 'Cherry-pick succeeds with rename across D/F conflicts' ' + git reset --hard && + git checkout master^0 && + git cherry-pick branch +' + +test_done -- 1.7.1.1.23.gafea6