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

Re: jk/tag-contains: stalled

From
Jeff King <peff@peff.net>
Date
Aug 5, 2010, 19:27 UTC
Message-ID
<20100805192723.GA10435@sigill>
In-Reply-To
<AANLkTimzn05tvwY=uG6VP6PXDHwA=wS9ECuK_9eWKtSx@mail.gmail.com>
On Thu, Aug 05, 2010 at 03:18:15PM -0400, Jay Soffian wrote:
Show 10 quoted lines
> On Thu, Aug 5, 2010 at 3:06 PM, Jeff King <peff@peff.net> wrote:
> > I agree it's a pretty generic name. I was trying to make this as generic
> > as possible, at least within the domain of commits, so it could be a
> > faster replacement for calls to is_descendant_of. Maybe commit_contains?
> 
> I'm going to side-track this slightly. I wonder why branch and tag
> have --contains, but it is not more generically available via
> rev-list?  I needed it the other day and spent 5 minutes looking at
> what it would take before I ended up just calling merge-base in a loop
> for the commits I wanted to check.

I'm not sure rev-list makes the most sense. We already have "show commits in X, but not in Y". But I gather you wanted "from a list (U,V,W,X), print each that contains Y". Which is not really a rev-list function anymore, as it is not about listing revisions, but rather about grepping a list you've given it.

Something like "git for-each-ref --contains" seems more sensible to me, though it is not as generic as we could make it (I cannot use an arbitrary list of commits to the "haystack", but only ones that have refs pointing to them).

-Peff
Previous: Jay SoffianNext: Jay Soffian
Message 9 of 27 in “What's cooking in git.git (Aug 2010, #01; Wed, 4)”
  1. Junio C HamanoAug 4, 2010
  2. jk/tag-contains: stalledTed Ts'o, Aug 5, 2010
  3. Junio C HamanoAug 5, 2010
  4. Junio C HamanoAug 5, 2010
  5. Jeff KingAug 5, 2010
  6. Junio C HamanoAug 5, 2010
  7. Jeff KingAug 5, 2010
  8. Jay SoffianAug 5, 2010
  9. Jeff KingAug 5, 2010
  10. Jay SoffianAug 5, 2010
  11. Ted Ts'oAug 5, 2010
  12. Junio C HamanoAug 5, 2010
  13. Thomas RastAug 5, 2010
  14. Junio C HamanoAug 5, 2010
  15. Junio C HamanoAug 6, 2010
  16. tc/checkout-BJonathan Nieder, Aug 5, 2010
  17. Tay Ray ChuanAug 5, 2010
  18. Matthieu MoyAug 5, 2010
  19. 1/5 diff: parse separate options like -S fooMatthieu Moy, Aug 5, 2010
  20. Jakub NarebskiAug 5, 2010
  21. Matthieu MoyAug 5, 2010
  22. 2/5 diff: split off a function for --stat-* option parsingMatthieu Moy, Aug 5, 2010
  23. 3/5 diff: parse separate options --stat-width n, --stat-name-width nMatthieu Moy, Aug 5, 2010
  24. 4/5 log: parse separate options like git log --grep fooMatthieu Moy, Aug 5, 2010
  25. 5/5 log: parse separate option for --globMatthieu Moy, Aug 5, 2010
  26. mm/shortopt-detachedJonathan Nieder, Aug 5, 2010
  27. Dmitry V. LevinAug 5, 2010

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.