3 test_description
='Merge-recursive merging renames'
4 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
=main
5 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
9 test_expect_success
'setup' '
11 a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
12 b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
13 c cccccccccccccccccccccccccccccccccccccccccccccccc
14 d dddddddddddddddddddddddddddddddddddddddddddddddd
15 e eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
16 f ffffffffffffffffffffffffffffffffffffffffffffffff
17 g gggggggggggggggggggggggggggggggggggggggggggggggg
18 h hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
19 i iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
20 j jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
21 k kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
22 l llllllllllllllllllllllllllllllllllllllllllllllll
23 m mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
24 n nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
25 o oooooooooooooooooooooooooooooooooooooooooooooooo
29 A AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
30 B BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
31 C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
32 D DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
33 E EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
34 F FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
35 G GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG
36 H HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
37 I IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
38 J JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ
39 K KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK
40 L LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
41 M MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
42 N NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
43 O OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
47 git commit -m "initial has A and M" &&
53 sed -e "/^g /s/.*/g : white changes a line/" <A >B &&
54 sed -e "/^G /s/.*/G : colored branch changes a line/" <M >N &&
56 git update-index --add --remove A B M N &&
57 git commit -m "white renames A->B, M->N" &&
60 echo created by red >R &&
61 git update-index --add R &&
62 git commit -m "red creates R" &&
65 sed -e "/^o /s/.*/g : blue changes a line/" <A >B &&
69 git commit -m "blue modify A" &&
74 # This test broke in 65ac6e9c3f47807cb603af07a6a9e1a43bc119ae
75 test_expect_success
'merge white into red (A->B,M->N)' '
76 git checkout -b red-white red &&
79 test_path_is_file B &&
80 test_path_is_file N &&
81 test_path_is_file R &&
82 test_path_is_missing A &&
83 test_path_is_missing M
86 # This test broke in 8371234ecaaf6e14fe3f2082a855eff1bbd79ae9
87 test_expect_success
'merge blue into white (A->B, mod A, A untracked)' '
88 git checkout -b white-blue white &&
92 test_path_is_file A &&
95 test_path_is_file B &&
96 test_path_is_file N &&
97 test_path_is_missing M