@matheusbsbs / matheus-bagliano / commits / 1c9b2d3aa1
Fork 0

Add a reminder test case for a merge with F/D transition

The problem is that if a file was replaced with a directory containing another file with the same content and mode, an attempt to merge it with a branch descended from a commit before this F->D transition will cause merge-recursive to break. It breaks even if there were no conflicting changes on that other branch. Originally reported by Anders Melchiorsen. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Alex Riesen committed May 11, 2009 at 11:31 UTC 1c9b2d3aa12ea4e34c1d04cc2af4e07a1eecb964
1 file changed +23
t/t6020-merge-df.sh
+23
@@ -22,4 +22,27 @@ git commit -m "File: dir"'
22
23 test_expect_code 1 'Merge with d/f conflicts' 'git merge "merge msg" B master'
24
25 +test_expect_failure 'F/D conflict' '
26 + git reset --hard &&
27 + git checkout master &&
28 + rm .git/index &&
29 +
30 + mkdir before &&
31 + echo FILE >before/one &&
32 + echo FILE >after &&
33 + git add . &&
34 + git commit -m first &&
35 +
36 + rm -f after &&
37 + git mv before after &&
38 + git commit -m move &&
39 +
40 + git checkout -b para HEAD^ &&
41 + echo COMPLETELY ANOTHER FILE >another &&
42 + git add . &&
43 + git commit -m para &&
44 +
45 + git merge master
46 +'
47 +
48 test_done