Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-02-03 00:36:58 +0300
committerJunio C Hamano <gitster@pobox.com>2017-02-03 00:36:58 +0300
commit85279e86499501be0f046cb9885ad24fbf9d0b8d (patch)
treed272cb15ce42c4b57ad685c133a8d1f36e836995 /t/t4202-log.sh
parentcc8364c28be5d15787ad4791afa0da49af78d007 (diff)
parent512aba261a8951a470147b493c720f205638ba14 (diff)
Merge branch 'nd/log-graph-configurable-colors'
Some people feel the default set of colors used by "git log --graph" rather limiting. A mechanism to customize the set of colors has been introduced. * nd/log-graph-configurable-colors: document behavior of empty color name color_parse_mem: allow empty color spec log --graph: customize the graph lines with config log.graphColors color.c: trim leading spaces in color_parse_mem() color.c: fix color_parse_mem() with value_len == 0
Diffstat (limited to 't/t4202-log.sh')
-rwxr-xr-xt/t4202-log.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index 1ccbd5948a..08ea725de3 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -359,6 +359,28 @@ test_expect_success 'log --graph --line-prefix="| | | " with merge' '
test_cmp expect actual
'
+cat > expect.colors <<\EOF
+* Merge branch 'side'
+<BLUE>|<RESET><CYAN>\<RESET>
+<BLUE>|<RESET> * side-2
+<BLUE>|<RESET> * side-1
+* <CYAN>|<RESET> Second
+* <CYAN>|<RESET> sixth
+* <CYAN>|<RESET> fifth
+* <CYAN>|<RESET> fourth
+<CYAN>|<RESET><CYAN>/<RESET>
+* third
+* second
+* initial
+EOF
+
+test_expect_success 'log --graph with merge with log.graphColors' '
+ test_config log.graphColors " blue,invalid-color, cyan, red , " &&
+ git log --color=always --graph --date-order --pretty=tformat:%s |
+ test_decode_color | sed "s/ *\$//" >actual &&
+ test_cmp expect.colors actual
+'
+
test_expect_success 'log --raw --graph -m with merge' '
git log --raw --graph --oneline -m master | head -n 500 >actual &&
grep "initial" actual