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