git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] name-rev: include taggerdate in considering the best name

From
Jeff King <peff@peff.net>
Date
Apr 22, 2016, 18:11 UTC
Message-ID
<20160422181103.GA5920@sigill.intra.peff.net>
In-Reply-To
<d58135a6720d6fda4c7bc609e77e2709d161fe25.1461332260.git.johannes.schindelin@gmx.de>
On Fri, Apr 22, 2016 at 03:39:01PM +0200, Johannes Schindelin wrote:
Show 18 quoted lines
> 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
Previous: Johannes SchindelinNext: Junio C Hamano
Message 2 of 7 in “name-rev: include taggerdate in considering the best name”
  1. name-rev: include taggerdate in considering the best nameJohannes Schindelin, Apr 22, 2016
  2. Jeff KingApr 22, 2016
  3. Junio C HamanoApr 22, 2016
  4. Junio C HamanoApr 22, 2016
  5. Linus TorvaldsApr 22, 2016
  6. Junio C HamanoApr 22, 2016
  7. Johannes SchindelinApr 24, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.