3 test_description='git log --graph of skewed merges'
7 test_expect_success 'log --graph with merge fusing with its left and right neighbors' '
25 git checkout --orphan _p &&
28 git checkout -b _q @^ && test_commit C &&
29 git checkout -b _r @^ && test_commit D &&
30 git checkout _p && git merge --no-ff _q _r -m E &&
31 git checkout _r && test_commit F &&
32 git checkout _p && git merge --no-ff _r -m G &&
33 git checkout @^^ && git merge --no-ff _p -m H &&
35 git log --graph --pretty=tformat:%s | sed "s/ *$//" >actual &&
36 test_cmp expect actual
39 test_expect_success 'log --graph with left-skewed merge' '
40 cat >expect <<-\EOF &&
62 git checkout --orphan 0_p && test_commit 0_A &&
63 git checkout -b 0_q 0_p && test_commit 0_B &&
64 git checkout -b 0_r 0_p &&
67 git checkout -b 0_s 0_p && test_commit 0_E &&
68 git checkout -b 0_t 0_p && git merge --no-ff 0_r^ 0_s -m 0_F &&
69 git checkout 0_p && git merge --no-ff 0_s -m 0_G &&
70 git checkout @^ && git merge --no-ff 0_q 0_r 0_t 0_p -m 0_H &&
72 git log --graph --pretty=tformat:%s | sed "s/ *$//" >actual &&
73 test_cmp expect actual