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

Re: [PATCH] tag: add -i and --introduced modifier for --contains

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 18, 2014, 23:36 UTC
Message-ID
<xmqq7g6mb47f.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CAB=NE6Vt8etieyR256Hxb=q6zMo7UAO2Zkm5900NrE+4=-3eXA@mail.gmail.com>
"Luis R. Rodriguez" <mcgrof@do-not-panic.com> writes:
> I think ultimately this reveals that given that tags *can* be
> arbitrary and subjective,...
Yes; see the part at the bottom.
>> Commit A can be described in terms of both v3.4 and v9.0,
>
> And in the real example case, why *would* c5905afb' be be described in
> terms of v3.5 instead of v3.4 ?

I am not interested in graphing that particular history between v3.4 and v3.5 myself. If you are interested, I already gave you enough information on how to figure that out.

Show 11 quoted lines
>>     - find candidate tags that can be used to "describe --contains"
>>       the commit A, yielding v3.4, v3.5 (not shown), and v9.0;
>
>>     - among the candidate tags, cull the ones that contain another
>>       candidate tag, rejecting v3.5 (not shown) and v9.0;
>
>>     - among the surviving tags, pick the closest.
>>
>> Hmm?
>
> Sounds good to me!
Not so fast ;-)

My other message to Peff in response to his another example has an updated position on this. "Reject candidates that can reach other candidates" is universally correct, but after that point, there are at least three but probably more options that suit preference of different people and project to break ties:

 - Your case that started this thread may want to favor v3.4 if only
   because that v3.4 _sounds_ smaller than v4.0 (in Peff's example),
   even when v3.4 and v4.0 do not have ancestry relationship.
 - The "closest" we have had is a heuristic to produce a result that
   is textually shorter.
 - And as I alluded to, "which one has the earliest timestamp?", is
   another valid question to ask.

And there may be more to appear. A new command line option (and possibly a new configuration) to choose from these three (and more heuristics that will be added later) would be necessary.

Previous: Luis R. RodriguezNext: Luis R. Rodriguez
Message 8 of 16 in “tag: add -i and --introduced modifier for --contains”
  1. tag: add -i and --introduced modifier for --containsLuis R. Rodriguez, Apr 16, 2014
  2. Junio C HamanoApr 16, 2014
  3. Luis R. RodriguezApr 16, 2014
  4. Junio C HamanoApr 17, 2014
  5. Jeff KingApr 17, 2014
  6. Junio C HamanoApr 18, 2014
  7. Luis R. RodriguezApr 18, 2014
  8. Junio C HamanoApr 18, 2014
  9. Luis R. RodriguezApr 22, 2014
  10. W. Trevor KingApr 22, 2014
  11. Jan KaraApr 22, 2014
  12. Junio C HamanoApr 22, 2014
  13. Andreas SchwabApr 17, 2014
  14. Junio C HamanoApr 17, 2014
  15. Andreas SchwabApr 17, 2014
  16. Junio C HamanoApr 17, 2014

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.