Skip to content

Commit

Permalink
Add a rename + D/F conflict testcase
Browse files Browse the repository at this point in the history
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 <agladysh@gmail.com>
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Alexander Gladysh authored and Junio C Hamano committed Jul 9, 2010
1 parent f15652d commit f433f70
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions t/t3509-cherry-pick-merge-df.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit f433f70

Please sign in to comment.