diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-01-08 12:44:12 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-01-08 12:44:13 -0800 |
commit | 1f5f3ffe5ceae12f0f7d78c42f657d9fee48fde2 (patch) | |
tree | 9cc28c86c02c4c3012a0fc04884f727eafa917e7 /t | |
parent | Merge branch 'tm/doc-submodule-absorb-fix' (diff) | |
parent | graph: fix lack of color in horizontal lines (diff) | |
download | tgif-1f5f3ffe5ceae12f0f7d78c42f657d9fee48fde2.tar.xz |
Merge branch 'ds/graph-assert-fix'
Since recent updates to the log graph rendering code, drawing
certain merges started triggering an assert on a condition that
would no longer hold true, which has been corrected.
* ds/graph-assert-fix:
graph: fix lack of color in horizontal lines
graph: drop assert() for merge with two collapsing parents
Diffstat (limited to 't')
-rwxr-xr-x | t/t4215-log-skewed-merges.sh | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/t/t4215-log-skewed-merges.sh b/t/t4215-log-skewed-merges.sh index 18709a723e..5661ed5881 100755 --- a/t/t4215-log-skewed-merges.sh +++ b/t/t4215-log-skewed-merges.sh @@ -240,4 +240,75 @@ test_expect_success 'log --graph with octopus merge with column joining its penu EOF ' +test_expect_success 'log --graph with multiple tips' ' + git checkout --orphan 6_1 && + test_commit 6_A && + git branch 6_2 && + git branch 6_4 && + test_commit 6_B && + git branch 6_3 && + test_commit 6_C && + git checkout 6_2 && test_commit 6_D && + git checkout 6_3 && test_commit 6_E && + git checkout -b 6_5 6_1 && + git merge --no-ff 6_2 -m 6_F && + git checkout 6_4 && test_commit 6_G && + git checkout 6_3 && + git merge --no-ff 6_4 -m 6_H && + git checkout 6_1 && + git merge --no-ff 6_2 -m 6_I && + + check_graph 6_1 6_3 6_5 <<-\EOF + * 6_I + |\ + | | * 6_H + | | |\ + | | | * 6_G + | | * | 6_E + | | | | * 6_F + | |_|_|/| + |/| | |/ + | | |/| + | |/| | + | * | | 6_D + | | |/ + | |/| + * | | 6_C + | |/ + |/| + * | 6_B + |/ + * 6_A + EOF +' + +test_expect_success 'log --graph with multiple tips and colors' ' + test_config log.graphColors red,green,yellow,blue,magenta,cyan && + cat >expect.colors <<-\EOF && + * 6_I + <RED>|<RESET><GREEN>\<RESET> + <RED>|<RESET> <GREEN>|<RESET> * 6_H + <RED>|<RESET> <GREEN>|<RESET> <YELLOW>|<RESET><BLUE>\<RESET> + <RED>|<RESET> <GREEN>|<RESET> <YELLOW>|<RESET> * 6_G + <RED>|<RESET> <GREEN>|<RESET> <YELLOW>|<RESET> <BLUE>|<RESET> * 6_F + <RED>|<RESET> <GREEN>|<RESET><RED>_<RESET><YELLOW>|<RESET><RED>_<RESET><BLUE>|<RESET><RED>/<RESET><GREEN>|<RESET> + <RED>|<RESET><RED>/<RESET><GREEN>|<RESET> <YELLOW>|<RESET> <BLUE>|<RESET><GREEN>/<RESET> + <RED>|<RESET> <GREEN>|<RESET> <YELLOW>|<RESET><GREEN>/<RESET><BLUE>|<RESET> + <RED>|<RESET> <GREEN>|<RESET><GREEN>/<RESET><YELLOW>|<RESET> <BLUE>|<RESET> + <RED>|<RESET> <GREEN>|<RESET> * <BLUE>|<RESET> 6_E + <RED>|<RESET> * <CYAN>|<RESET> <BLUE>|<RESET> 6_D + <RED>|<RESET> <BLUE>|<RESET> <CYAN>|<RESET><BLUE>/<RESET> + <RED>|<RESET> <BLUE>|<RESET><BLUE>/<RESET><CYAN>|<RESET> + * <BLUE>|<RESET> <CYAN>|<RESET> 6_C + <CYAN>|<RESET> <BLUE>|<RESET><CYAN>/<RESET> + <CYAN>|<RESET><CYAN>/<RESET><BLUE>|<RESET> + * <BLUE>|<RESET> 6_B + <BLUE>|<RESET><BLUE>/<RESET> + * 6_A + EOF + git log --color=always --graph --date-order --pretty=tformat:%s 6_1 6_3 6_5 >actual.colors.raw && + test_decode_color <actual.colors.raw | sed "s/ *\$//" >actual.colors && + test_cmp expect.colors actual.colors +' + test_done |