From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-2.7 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id B6F3320450 for ; Fri, 3 Nov 2017 12:05:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753007AbdKCMFj (ORCPT ); Fri, 3 Nov 2017 08:05:39 -0400 Received: from mout.gmx.net ([212.227.15.19]:61769 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750857AbdKCMFi (ORCPT ); Fri, 3 Nov 2017 08:05:38 -0400 Received: from virtualbox ([37.201.193.73]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MPE7E-1e6Ask0w8u-004Rid; Fri, 03 Nov 2017 13:05:30 +0100 Date: Fri, 3 Nov 2017 13:05:27 +0100 (CET) From: Johannes Schindelin X-X-Sender: virtualbox@virtualbox To: Stefan Beller cc: Andreas Schwab , Jacob Keller , Junio C Hamano , git , Kevin Daudt Subject: Re: [PATCHv2 6/7] builtin/describe.c: describe a blob In-Reply-To: Message-ID: References: <20171031003351.22341-1-sbeller@google.com> <20171031211852.13001-1-sbeller@google.com> <20171031211852.13001-7-sbeller@google.com> <871slhm9dm.fsf@linux-m68k.org> User-Agent: Alpine 2.21.1 (DEB 209 2017-03-23) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Provags-ID: V03:K0:CMtmRLvsvj/Mk7fAZJ35Dxokr1RpI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4wjL2VPwc9I9pkbwbABbt8fpXGaUTI= Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Hi Stefan, On Thu, 2 Nov 2017, Stefan Beller wrote: > On Thu, Nov 2, 2017 at 12:23 AM, Andreas Schwab wrote: > > On Nov 01 2017, Johannes Schindelin wrote: > > > >> Sure, but it is still a tricky thing. Imagine > >> > >> - A1 - B1 - A2 - B2 - B3 > >> > >> where all the B* commits have the blob. Do you really want to report B1 > >> rather than B2 as the commit introducing the blob? (I would prefer B2...) > > > > What if B3 renames or copies the blob? > > > > Andreas. > > With the current proposed patch you'd find B3, and then use the diff machinery > to digg deeper from there (renames/copies ought to be easy to detect already?) > > So with a copy B3 might be a better start than B1, as starting from B1 you > would not find B3 easily. > > For a rename, I would think a reverse log/blame on B1:path may help. > > With that said, I think I'll just reroll the series with the current logic > fixing the other minor issues that were brought up as B3 seems to > be the most versatile (though not optimal) answer for many use cases. I know this is a bit of semantics, but I disagree that B3 is the most versatile. For my use cases, `git describe` comes in handy relatively rarely, and usually only when I want to know what version some work was based on. In that respect, B2 would be the most versatile answer. However, if you say that B3 is the easiest answer to explain, I whole-heartedly agree. Any other answer would be necessarily more complicated to reason about, given that we're operating on a DAG, i.e. not always on a linear history. Ciao, Dscho