graph: example of graph output that can be simplified
[git] / t / t4215-log-skewed-merges.sh
1 #!/bin/sh
2
3 test_description='git log --graph of skewed merges'
4
5 . ./test-lib.sh
6
7 test_expect_success 'log --graph with merge fusing with its left and right neighbors' '
8         cat >expect <<-\EOF &&
9         *   H
10         |\
11         | *   G
12         | |\
13         | | * F
14         | | |
15         | |  \
16         | *-. \   E
17         | |\ \ \
18         |/ / / /
19         | | | /
20         | | |/
21         | | * D
22         | * | C
23         | |/
24         * | B
25         |/
26         * A
27         EOF
28
29         git checkout --orphan _p &&
30         test_commit A &&
31         test_commit B &&
32         git checkout -b _q @^ && test_commit C &&
33         git checkout -b _r @^ && test_commit D &&
34         git checkout _p && git merge --no-ff _q _r -m E &&
35         git checkout _r && test_commit F &&
36         git checkout _p && git merge --no-ff _r -m G &&
37         git checkout @^^ && git merge --no-ff _p -m H &&
38
39         git log --graph --pretty=tformat:%s | sed "s/ *$//" >actual &&
40         test_cmp expect actual
41 '
42
43 test_done