public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: "René Scharfe" <l.s.r@web.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Seth McDonald <sethmcmail@pm.me>, git@vger.kernel.org
Subject: Re: [PATCH] blame: fix coloring for repeated suspects
Date: Mon, 2 Feb 2026 17:24:45 +0100	[thread overview]
Message-ID: <62e3ab10-bfa4-4ec7-9838-0bad89d04edd@web.de> (raw)
In-Reply-To: <xmqqfr7j2u6q.fsf@gitster.g>

On 2/2/26 1:42 PM, Junio C Hamano wrote:
> 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"?

Yes.

>> 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.
Do you mean blame_coalesce()?  It is called, but won't merge entries
that are not ignored with those that are.  And we do need to keep them
separate for blame.markignoredlines to work.

René


  reply	other threads:[~2026-02-02 16:24 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
2026-02-02 16:24     ` René Scharfe [this message]
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=62e3ab10-bfa4-4ec7-9838-0bad89d04edd@web.de \
    --to=l.s.r@web.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --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