summaryrefslogtreecommitdiff
path: root/t/t8012-blame-colors.sh
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-04-24 00:09:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-04-24 02:03:17 (GMT)
commit0dc95a4d8a71bcb0c9d0163716bd99c2d785bd10 (patch)
treeeec6accb6f09b4efde6a51a78f79991b8f8e50bf /t/t8012-blame-colors.sh
parent25d5f52901f0d56b2e3df06b53062ee599b0403b (diff)
downloadgit-0dc95a4d8a71bcb0c9d0163716bd99c2d785bd10.zip
git-0dc95a4d8a71bcb0c9d0163716bd99c2d785bd10.tar.gz
git-0dc95a4d8a71bcb0c9d0163716bd99c2d785bd10.tar.bz2
builtin/blame: add new coloring scheme config
Add a config option that allows selecting the default color scheme for blame. The command line still takes precedence over the configuration. It is to be seen, how color.ui will integrate with blame coloring. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t8012-blame-colors.sh')
-rwxr-xr-xt/t8012-blame-colors.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/t/t8012-blame-colors.sh b/t/t8012-blame-colors.sh
index ae9aa79..ed38f74 100755
--- a/t/t8012-blame-colors.sh
+++ b/t/t8012-blame-colors.sh
@@ -8,6 +8,8 @@ PROG='git blame -c'
test_expect_success 'colored blame colors contiguous lines' '
git -c color.blame.repeatedLines=yellow blame --color-lines --abbrev=12 hello.c >actual.raw &&
+ git -c color.blame.repeatedLines=yellow -c blame.coloring=repeatedLines blame --abbrev=12 hello.c >actual.raw.2 &&
+ test_cmp actual.raw actual.raw.2 &&
test_decode_color <actual.raw >actual &&
grep "<YELLOW>" <actual >darkened &&
grep "(F" darkened > F.expect &&
@@ -18,6 +20,8 @@ test_expect_success 'colored blame colors contiguous lines' '
test_expect_success 'color by age consistently colors old code' '
git blame --color-by-age hello.c >actual.raw &&
+ git -c blame.coloring=highlightRecent blame hello.c >actual.raw.2 &&
+ test_cmp actual.raw actual.raw.2 &&
test_decode_color <actual.raw >actual &&
grep "<BLUE>" <actual >colored &&
test_line_count = 10 colored