public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "René Scharfe" <l.s.r@web.de>
Cc: Seth McDonald <sethmcmail@pm.me>,  git@vger.kernel.org
Subject: Re: [PATCH] blame: fix coloring for repeated suspects
Date: Mon, 02 Feb 2026 04:42:21 -0800	[thread overview]
Message-ID: <xmqqfr7j2u6q.fsf@gitster.g> (raw)
In-Reply-To: <28ac1ee6-f3e9-4789-92b7-903788430697@web.de> ("René Scharfe"'s message of "Sun, 1 Feb 2026 12:47:53 +0100")

René Scharfe <l.s.r@web.de> writes:

> 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 a the present entry when determining whether a line needs

"look at"?

> to be colored for --color-lines.  Check the previous entry as well.

While this should work, I am kind of surprised that this has to done
as a sepecial case.  It often happens that two adjacent blocks may
be originally pass their blames to different parents of a merge, but
then the blame passes down through both branches down to the same
ancestor, at which point these two blocks need to be merged back
into the same source again, and I was hoping that a helper function
for it would be called to take care of this case as well.

In any case, thaks for a fix, and with a test, which is great.


  parent reply	other threads:[~2026-02-02 12:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-01  7:32 [BUG] git-blame: --color-lines ignores --ignore-rev Seth McDonald
2026-02-01 11:47 ` [PATCH] blame: fix coloring for repeated suspects René Scharfe
2026-02-02  2:02   ` Seth McDonald
2026-02-02 12:42   ` Junio C Hamano [this message]
2026-02-02 16:24     ` René Scharfe
2026-02-02 17:56       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqfr7j2u6q.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=l.s.r@web.de \
    --cc=sethmcmail@pm.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox