git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Johannes Schindelin <johannes.schindelin@gmx.de>
Cc: "Junio C Hamano" <gitster@pobox.com>,
	git@vger.kernel.org,
	"Linus Torvalds" <torvalds@linux-foundation.org>,
	"Andreas Schwab" <schwab@linux-m68k.org>,
	"Olaf Hering" <olaf@aepfle.de>,
	"Uwe Kleine-König" <ukleinek@informatik.uni-freiburg.de>
Subject: Re: [PATCH] name-rev: include taggerdate in considering the best name
Date: Fri, 22 Apr 2016 14:11:04 -0400	[thread overview]
Message-ID: <20160422181103.GA5920@sigill.intra.peff.net> (raw)
In-Reply-To: <d58135a6720d6fda4c7bc609e77e2709d161fe25.1461332260.git.johannes.schindelin@gmx.de>

On Fri, Apr 22, 2016 at 03:39:01PM +0200, Johannes Schindelin wrote:

> We most likely want the oldest tag that contained the commit to be
> reported. So let's remember the taggerdate, and make it more important
> than anything else when choosing the best name for a given commit.
> 
> Suggested by Linus Torvalds.
> 
> Note that we need to update t9903 because it tested for the old behavior
> (which preferred the description "b1~1" over "tags/t2~1").
> 
> We might want to introduce a --heed-taggerdate option, and make the new
> behavior dependent on that, if it turns out that some scripts rely on the
> old name-rev method.
> 
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
>  builtin/name-rev.c     | 19 +++++++++++++------
>  t/t9903-bash-prompt.sh |  2 +-
>  2 files changed, 14 insertions(+), 7 deletions(-)

That turned out to be quite simple (I wasn't sure originally if we'd
actually visit all of the tags, which is why I had conceived of this as
an initial pass; but of course it makes sense that we'd have to see all
of the tags in the existing code).

I confirmed that it does find the "optimal" tag for the case we've been
discussing.

We could _also_ tweak the merge-weight as Linus's patch did, just
because 10000 has more basis than 65535. But I think it really matters a
lot less at this point.

-Peff

  reply	other threads:[~2016-04-22 18:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-22 13:39 [PATCH] name-rev: include taggerdate in considering the best name Johannes Schindelin
2016-04-22 18:11 ` Jeff King [this message]
2016-04-22 18:27   ` Junio C Hamano
2016-04-22 18:40     ` Junio C Hamano
2016-04-22 18:45   ` Linus Torvalds
2016-04-22 20:50     ` Junio C Hamano
2016-04-24  6:35       ` Johannes Schindelin

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=20160422181103.GA5920@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johannes.schindelin@gmx.de \
    --cc=olaf@aepfle.de \
    --cc=schwab@linux-m68k.org \
    --cc=torvalds@linux-foundation.org \
    --cc=ukleinek@informatik.uni-freiburg.de \
    /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;
as well as URLs for NNTP newsgroup(s).