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