From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 469ABC433DF for ; Fri, 7 Aug 2020 22:26:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 149372177B for ; Fri, 7 Aug 2020 22:26:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726198AbgHGW0c (ORCPT ); Fri, 7 Aug 2020 18:26:32 -0400 Received: from cloud.peff.net ([104.130.231.41]:52428 "EHLO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726015AbgHGW0b (ORCPT ); Fri, 7 Aug 2020 18:26:31 -0400 Received: (qmail 3080 invoked by uid 109); 7 Aug 2020 22:26:31 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Fri, 07 Aug 2020 22:26:31 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 19134 invoked by uid 111); 7 Aug 2020 22:26:30 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Fri, 07 Aug 2020 18:26:30 -0400 Authentication-Results: peff.net; auth=none Date: Fri, 7 Aug 2020 18:26:30 -0400 From: Jeff King To: Junio C Hamano Cc: Nuthan Munaiah , git@vger.kernel.org Subject: Re: `git blame` Line Number Off-by-one Message-ID: <20200807222630.GA3750245@coredump.intra.peff.net> References: <20200807212159.GA1871940@coredump.intra.peff.net> <20200807213349.GB1871940@coredump.intra.peff.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Fri, Aug 07, 2020 at 03:05:27PM -0700, Junio C Hamano wrote: > Jeff King 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