diff options
| author | Junio C Hamano <gitster@pobox.com> | 2026-02-11 12:29:08 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-02-11 12:29:08 -0800 |
| commit | 06cef761b1067c6debb7dc946f2c4f202fd60083 (patch) | |
| tree | 1b5cbcbce1c28db8c61c8cace8e343d97c0de653 /t | |
| parent | ea03b35bb59b73f00180c88d9875ffeb72f41adc (diff) | |
| parent | d519082d4ebf998cd9d10a5ef33544a479e7699c (diff) | |
| download | git-06cef761b1067c6debb7dc946f2c4f202fd60083.tar.xz | |
Merge branch 'rs/blame-ignore-colors-fix'
"git blame --ignore-revs=... --color-lines" did not account for
ignored revisions passing blame to the same commit an adjacent line
gets blamed for.
* rs/blame-ignore-colors-fix:
blame: fix coloring for repeated suspects
Diffstat (limited to 't')
| -rwxr-xr-x | t/t8012-blame-colors.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t8012-blame-colors.sh b/t/t8012-blame-colors.sh index 3d77352650..5562eba436 100755 --- a/t/t8012-blame-colors.sh +++ b/t/t8012-blame-colors.sh @@ -28,6 +28,20 @@ test_expect_success 'colored blame colors contiguous lines' ' test_line_count = 3 H.expect ' +test_expect_success 'color lines becoming contiguous due to --ignore-rev' ' + mv hello.c hello.orig && + sed "s/ / /g" <hello.orig >hello.c && + git add hello.c && + git commit -m"tabs to spaces" && + git -c color.blame.repeatedLines=yellow blame --color-lines --ignore-rev=HEAD hello.c >actual.raw && + test_decode_color <actual.raw >actual && + grep "<YELLOW>" <actual >darkened && + grep "(F" darkened > F.expect && + grep "(H" darkened > H.expect && + test_line_count = 2 F.expect && + test_line_count = 3 H.expect +' + 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 && |
