git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Jay Soffian <jaysoffian@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>, Ted Ts'o <tytso@mit.edu>,
	git@vger.kernel.org
Subject: Re: jk/tag-contains: stalled
Date: Thu, 5 Aug 2010 15:27:23 -0400	[thread overview]
Message-ID: <20100805192723.GA10435@sigill> (raw)
In-Reply-To: <AANLkTimzn05tvwY=uG6VP6PXDHwA=wS9ECuK_9eWKtSx@mail.gmail.com>

On Thu, Aug 05, 2010 at 03:18:15PM -0400, Jay Soffian wrote:

> 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

  reply	other threads:[~2010-08-05 19:27 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-04 22:24 What's cooking in git.git (Aug 2010, #01; Wed, 4) Junio C Hamano
2010-08-05  0:16 ` jk/tag-contains: stalled Ted Ts'o
2010-08-05 16:29   ` Junio C Hamano
2010-08-05 17:05     ` Junio C Hamano
2010-08-05 17:36       ` Jeff King
2010-08-05 18:47         ` Junio C Hamano
2010-08-05 19:06           ` Jeff King
2010-08-05 19:18             ` Jay Soffian
2010-08-05 19:27               ` Jeff King [this message]
2010-08-05 20:00                 ` Jay Soffian
2010-08-05 20:36             ` Ted Ts'o
2010-08-05 20:53             ` Junio C Hamano
2010-08-05 21:38               ` Thomas Rast
2010-08-05 22:15                 ` Junio C Hamano
2010-08-06  5:44             ` Junio C Hamano
2010-08-05  6:53 ` tc/checkout-B Jonathan Nieder
2010-08-05 10:18   ` tc/checkout-B Tay Ray Chuan
2010-08-05  8:20 ` What's cooking in git.git (Aug 2010, #01; Wed, 4) Matthieu Moy
2010-08-05  8:22   ` [PATCH 1/5] diff: parse separate options like -S foo Matthieu Moy
2010-08-05 12:16     ` Jakub Narebski
2010-08-05 12:24       ` Matthieu Moy
2010-08-05  8:22   ` [PATCH 2/5] diff: split off a function for --stat-* option parsing Matthieu Moy
2010-08-05  8:22   ` [PATCH 3/5] diff: parse separate options --stat-width n, --stat-name-width n Matthieu Moy
2010-08-05  8:22   ` [PATCH 4/5] log: parse separate options like git log --grep foo Matthieu Moy
2010-08-05  8:22   ` [PATCH 5/5] log: parse separate option for --glob Matthieu Moy
2010-08-05 11:41   ` mm/shortopt-detached Jonathan Nieder
2010-08-05 21:12 ` jc/sha1-name-find-fix Dmitry V. Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100805192723.GA10435@sigill \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jaysoffian@gmail.com \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).