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, 16:26 UTC
Message-ID
<xmqqlhv2d2no.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20140417221619.GA697@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 13 quoted lines
>  ---A---B---C-----D---E---F (maint, v3.4)
>      \   \       /
>       \   ---G-----H---I (master, v4.0)
>        \       /  /
>         ------J---
>
> The fix is J, and it got merged up to maint at D, and to master at H.
> v4.0 does not contain v3.4. What's the best description of J?
>
> By the rules above, we hit the third rule "pick the closest". Which
> means we choose v3.4 or v4.0 based solely on how many commits are
> between the topic's merge and the tag release. Which has nothing at all
> to do with the topic itself.

Even if J..F and J..I were of the same hop-count, there is no fundamental reason to choose one over the other.

What is "best" at that point depends on what the user wants to see.
 - Luis's case that started this thread may want to favor v3.4 if
   only because that "sounds" the smaller, even though v3.4 and v4.0
   in the illustration cannot be compared.
 - I think the "closest" we have had is primarily a heuristic to
   favour the result that is textually shorter.
 - And as I alluded to, "which one has the earliest timestamp?", is
   another valid question to ask.

In other words, there is no single "correct" answer, once you have multiple canidates that are all valid from topological point of view.

Show 5 quoted lines
> In this case we'd show v4.0 (because "J-H-I" is shorter than "J-D-E-F").
> But I suspect most users would want to know v3.4, because they want to
> know the "oldest" release they can move up to that contains the commit.
> But that notion of oldness is not conveyed by the graph above; it's only
> an artifact of the tag names.
Yes, exactly.
Previous: Jeff KingNext: Luis R. Rodriguez
Message 6 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.