summaryrefslogtreecommitdiff
path: root/t/t4215-log-skewed-merges.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t4215-log-skewed-merges.sh')
-rwxr-xr-xt/t4215-log-skewed-merges.sh45
1 files changed, 39 insertions, 6 deletions
diff --git a/t/t4215-log-skewed-merges.sh b/t/t4215-log-skewed-merges.sh
index 4582ba0..dc187b5 100755
--- a/t/t4215-log-skewed-merges.sh
+++ b/t/t4215-log-skewed-merges.sh
@@ -11,12 +11,8 @@ test_expect_success 'log --graph with merge fusing with its left and right neigh
| * G
| |\
| | * F
- | | |
- | | \
- | *-. \ E
- | |\ \ \
- |/ / / /
- | | | /
+ | * \ E
+ |/|\ \
| | |/
| | * D
| * | C
@@ -40,4 +36,41 @@ test_expect_success 'log --graph with merge fusing with its left and right neigh
test_cmp expect actual
'
+test_expect_success 'log --graph with left-skewed merge' '
+ cat >expect <<-\EOF &&
+ *-----. 0_H
+ |\ \ \ \
+ | | | | * 0_G
+ | |_|_|/|
+ |/| | | |
+ | | | * \ 0_F
+ | |_|/|\ \
+ |/| | | |/
+ | | | | * 0_E
+ | |_|_|/
+ |/| | |
+ | | * | 0_D
+ | | |/
+ | | * 0_C
+ | |/
+ |/|
+ | * 0_B
+ |/
+ * 0_A
+ EOF
+
+ git checkout --orphan 0_p && test_commit 0_A &&
+ git checkout -b 0_q 0_p && test_commit 0_B &&
+ git checkout -b 0_r 0_p &&
+ test_commit 0_C &&
+ test_commit 0_D &&
+ git checkout -b 0_s 0_p && test_commit 0_E &&
+ git checkout -b 0_t 0_p && git merge --no-ff 0_r^ 0_s -m 0_F &&
+ git checkout 0_p && git merge --no-ff 0_s -m 0_G &&
+ git checkout @^ && git merge --no-ff 0_q 0_r 0_t 0_p -m 0_H &&
+
+ git log --graph --pretty=tformat:%s | sed "s/ *$//" >actual &&
+ test_cmp expect actual
+'
+
test_done