Re: Listing commits that are _exclusively_ available on a given branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 23, 2012 at 10:38:32AM -0700, Junio C Hamano wrote:

> Jeff King <peff@xxxxxxxx> writes:
> 
> > No, I think that is the only way to do it. The algorithm run by rev-list
> > in that case should be optimal, so there is nothing to improve there.
> > Syntactically, it's a little bit of a pain because there is no way to
> > tell rev-list "--all, except for this one branch" short of using grep.
> > We could add a new syntax for that, but I'm not sure what it would look
> > like (or if it would be any easier on the eyes than what you have).
> 
> We discussed --exclude-refs="refs/tags/expermental-*" that would affect
> how --all, --heads, and friends are processed several weeks ago, didn't
> we?

Gmane seems to be down at the moment, but I think the thread you are
talking about can be found here:

  http://mid.gmane.org/7v4nuvghfk.fsf@xxxxxxxxxxxxxxxxxxxxxxxx
  http://mid.gmane.org/4F391F5C.1000400@xxxxxxxxxxxx
  http://mid.gmane.org/7vaa4meat5.fsf@xxxxxxxxxxxxxxxxxxxxxxxx

It talks about excluding from the positive side, like:

  git rev-list --all --exclude-ref=refs/heads/foo

That can also be extended to the negative side, like:

  git rev-list refs/heads/foo --not --all --exclude-ref=refs/heads/foo

though it is slightly confusing to read due to the double negation (you
are "--not" "--exclude"-ing the ref). However, I think the double
negation is necessary (i.e., you could not say "--include-ref"), because
the two negations are talking about two different things (one is about
limiting the list of items fed to the graph traversal, and the other is
about limiting the graph traversal itself).

So yeah, I think that would work. But AFAIK, there has been no other
activity on that topic.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]