]> git.ipfire.org Git - thirdparty/git.git/commit
blame: fix coloring for repeated suspects
authorRené Scharfe <l.s.r@web.de>
Sun, 1 Feb 2026 11:47:53 +0000 (12:47 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 2 Feb 2026 21:48:13 +0000 (13:48 -0800)
commitd519082d4ebf998cd9d10a5ef33544a479e7699c
tree48fde642dc8da0b3550e4843580c113bde3a47fd
parentf368df439b31b422169975cc3c95f7db6a46eada
blame: fix coloring for repeated suspects

The option --ignore-rev passes the blame to an older commit.  This can
cause adjacent scoreboard entries to blame the same commit.  Currently
we only look at the present entry when determining whether a line needs
to be colored for --color-lines.  Check the previous entry as well.

Reported-by: Seth McDonald <sethmcmail@pm.me>
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/blame.c
t/t8012-blame-colors.sh