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

Walking children commits?

From
Mike Hommey <mh@glandium.org>
Date
Mar 30, 2015, 23:02 UTC
Message-ID
<20150330230209.GA20421@glandium.org>
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).

Am I doing something wrong, or am I hitting a bug in --ancestry-path walking? In the latter case, I'll try to find a reduced test case, because currently, this involves a 260k commit, 1.5GB repository with close to 2k heads and a set of 153 commits to find the children of.

Cheers,
Mike
Next: Mike Hommey
Message 1 of 3 in “Walking children commits?”
  1. Mike HommeyMar 30, 2015
  2. Mike HommeyMar 30, 2015
  3. Mike HommeyMar 30, 2015

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.