@matheusbsbs / matheus-bagliano / commits / f433f70547
Fork 0

Add a rename + D/F conflict testcase

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>

Alexander Gladysh committed Jul 9, 2010 at 07:10 UTC f433f70547ebf038a862ca72565ae42e50d4adfa
1 file changed +35
t/t3509-cherry-pick-merge-df.sh new
+35
@@ -0,0 +1,35 @@
1 +#!/bin/sh
2 +
3 +test_description='Test cherry-pick with directory/file conflicts'
4 +. ./test-lib.sh
5 +
6 +test_expect_success 'Setup rename across paths each below D/F conflicts' '
7 + mkdir a &&
8 + >a/f &&
9 + git add a &&
10 + git commit -m a &&
11 +
12 + mkdir b &&
13 + ln -s ../a b/a &&
14 + git add b &&
15 + git commit -m b &&
16 +
17 + git checkout -b branch &&
18 + rm b/a &&
19 + mv a b/a &&
20 + ln -s b/a a &&
21 + git add . &&
22 + git commit -m swap &&
23 +
24 + >f1 &&
25 + git add f1 &&
26 + git commit -m f1
27 +'
28 +
29 +test_expect_failure 'Cherry-pick succeeds with rename across D/F conflicts' '
30 + git reset --hard &&
31 + git checkout master^0 &&
32 + git cherry-pick branch
33 +'
34 +
35 +test_done