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
Junio C Hamano <gitster@pobox.com>
Date
Apr 22, 2016, 18:40 UTC
Message-ID
<xmqqa8klpjvc.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<xmqqeg9xpkhb.fsf@gitster.mtv.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 15 quoted lines
> Jeff King <peff@peff.net> writes:
>
>> 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).
>> ...
>> 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.
>
> I agree, but if we were to go this route of keeping track of "some"
> attribute of the tip the traversal started from, I wonder if it is
> better to keep the actual tag object, not just its tagger date as an
> unsigned long, in the new field.

Actually, I take it back. The "object" approach would not give us enough flexibility to go beyond "date". A light-weight tag that directly point at a commit object can still yield "date" (probably "committerdate" to be compared with other dates, be it the committer date from another commit or the tagger date from a real tag), but if we later wanted to do a v:refname kind of comparison, we'd need to keep the name of the ref (we cannot go back from the commit object to the refname), so at that point, we would be talking about adding yet another field anyway to hold the refname, in addition to the field we would be adding at this step. As we do not want to be always doing "name to object to date" conversion in this codepath, adding an "unsigned long" date field is the right thing to do here. A more elaborate future can add refname (or refname and object) as additional fields, but we can wait because even after that update the codepath to do date comparison likely would want to have direct access to the date field anyway.

Previous: Junio C HamanoNext: Linus Torvalds
Message 4 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.