Re: `git blame` Line Number Off-by-one
- From
Jeff King <peff@peff.net>
- Date
- Aug 7, 2020, 22:26 UTC
- Message-ID
- <20200807222630.GA3750245@coredump.intra.peff.net>
- In-Reply-To
- <xmqq7duaf6xk.fsf@gitster.c.googlers.com>
On Fri, Aug 07, 2020 at 03:05:27PM -0700, Junio C Hamano wrote:
Show 12 quoted lines
> Jeff King <peff@peff.net> writes: > > > Dropping it entirely, as below, doesn't break any tests. Junio, do you > > know of a case this is meant to improve? > > I think the only conceivable case is that in the middle of a single > block of text in an ancient version, another block of lines gets > inserted during the evolution of the file, but in the end these > intermediate edits all go away and the same original text remains. > > In such a case, without coalescing, we would not treat the original > single block of text as a single unit.
Yeah, that makes sense, and it should be possible to construct a case based on that.
> IIRC, blame has some threshold that makes too small a block not > subject to move and copy detection, and it is most likely to avoid > fragmenting the blocks too small.
I don't know if that would matter here, though. This coalescing is taking place after all of the blaming has happened, and is just preparing the final output.
-Peff