From: Mike Hommey <mh@glandium.org>
To: git@vger.kernel.org
Subject: Re: Walking children commits?
Date: Tue, 31 Mar 2015 08:44:45 +0900 [thread overview]
Message-ID: <20150330234445.GA23391@glandium.org> (raw)
In-Reply-To: <20150330233552.GA22637@glandium.org>
On Tue, Mar 31, 2015 at 08:35:52AM +0900, Mike Hommey wrote:
> On Tue, Mar 31, 2015 at 08:02:09AM +0900, Mike Hommey wrote:
> > Hi,
> >
> > I am trying to get all the children commits of a set of commits. To do
> > that, I'm using this:
> >
> > git rev-list --topo-order --ancestry-path --boundary <all heads> ^A ^B ...
> >
> > where A, B, and following are those commits I want the children of. From
> > the gitrevisions documentation, it seems that should get me what I want,
> > but if I build a dag manually (from the output of rev-list --parents)
> > and get all the children of those commits, I get more results than what
> > the command above returns (and that command also gives false positives).
>
> The false positives are actually boundaries other than A, B, etc. so I'd
> actually need to remove --boundary and add A, B to the result manually.
> That still leaves the missing results, though.
Ah, the missing results are commits that both are part of the set of
commits and are heads...
So all in all --ancestry-path works for my use case, but I need
post-processing.
Mike
prev parent reply other threads:[~2015-03-30 23:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-30 23:02 Walking children commits? Mike Hommey
2015-03-30 23:35 ` Mike Hommey
2015-03-30 23:44 ` Mike Hommey [this message]
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=20150330234445.GA23391@glandium.org \
--to=mh@glandium.org \
--cc=git@vger.kernel.org \
/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).