{"thread":{"id":"38950","subject":"Walking children commits?","startedAt":"2015-03-30T23:02:09Z","lastAt":"2015-03-30T23:44:45Z","messageCount":3,"participants":["Mike Hommey"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"258703","messageId":"20150330230209.GA20421@glandium.org","threadId":"38950","inReplyTo":null,"subject":"Walking children commits?","fromName":"Mike Hommey","fromEmail":"mh@glandium.org","sentAt":"2015-03-30T23:02:09Z","receivedAt":"2015-03-30T23:02:09Z","isPatch":false,"sender":{"key":"mh@glandium.org","avatar":"https://avatars.githubusercontent.com/u/1038527?v=4"},"body":"Hi,\n\nI am trying to get all the children commits of a set of commits. To do\nthat, I'm using this:\n\n  git rev-list --topo-order --ancestry-path --boundary <all heads> ^A ^B ...\n\nwhere A, B, and following are those commits I want the children of. From\nthe gitrevisions documentation, it seems that should get me what I want,\nbut if I build a dag manually (from the output of rev-list --parents)\nand get all the children of those commits, I get more results than what\nthe command above returns (and that command also gives false positives).\n\nAm I doing something wrong, or am I hitting a bug in --ancestry-path\nwalking? In the latter case, I'll try to find a reduced test case,\nbecause currently, this involves a 260k commit, 1.5GB repository with\nclose to 2k heads and a set of 153 commits to find the children of.\n\nCheers,\n\nMike\n"},{"id":"258707","messageId":"20150330233552.GA22637@glandium.org","threadId":"38950","inReplyTo":"20150330230209.GA20421@glandium.org","subject":"Re: Walking children commits?","fromName":"Mike Hommey","fromEmail":"mh@glandium.org","sentAt":"2015-03-30T23:35:52Z","receivedAt":"2015-03-30T23:35:52Z","isPatch":false,"sender":{"key":"mh@glandium.org","avatar":"https://avatars.githubusercontent.com/u/1038527?v=4"},"body":"On Tue, Mar 31, 2015 at 08:02:09AM +0900, Mike Hommey wrote:\n> Hi,\n> \n> I am trying to get all the children commits of a set of commits. To do\n> that, I'm using this:\n> \n>   git rev-list --topo-order --ancestry-path --boundary <all heads> ^A ^B ...\n> \n> where A, B, and following are those commits I want the children of. From\n> the gitrevisions documentation, it seems that should get me what I want,\n> but if I build a dag manually (from the output of rev-list --parents)\n> and get all the children of those commits, I get more results than what\n> the command above returns (and that command also gives false positives).\n\nThe false positives are actually boundaries other than A, B, etc. so I'd\nactually need to remove --boundary and add A, B to the result manually.\nThat still leaves the missing results, though.\n\nMike\n"},{"id":"258709","messageId":"20150330234445.GA23391@glandium.org","threadId":"38950","inReplyTo":"20150330233552.GA22637@glandium.org","subject":"Re: Walking children commits?","fromName":"Mike Hommey","fromEmail":"mh@glandium.org","sentAt":"2015-03-30T23:44:45Z","receivedAt":"2015-03-30T23:44:45Z","isPatch":false,"sender":{"key":"mh@glandium.org","avatar":"https://avatars.githubusercontent.com/u/1038527?v=4"},"body":"On Tue, Mar 31, 2015 at 08:35:52AM +0900, Mike Hommey wrote:\n> On Tue, Mar 31, 2015 at 08:02:09AM +0900, Mike Hommey wrote:\n> > Hi,\n> > \n> > I am trying to get all the children commits of a set of commits. To do\n> > that, I'm using this:\n> > \n> >   git rev-list --topo-order --ancestry-path --boundary <all heads> ^A ^B ...\n> > \n> > where A, B, and following are those commits I want the children of. From\n> > the gitrevisions documentation, it seems that should get me what I want,\n> > but if I build a dag manually (from the output of rev-list --parents)\n> > and get all the children of those commits, I get more results than what\n> > the command above returns (and that command also gives false positives).\n> \n> The false positives are actually boundaries other than A, B, etc. so I'd\n> actually need to remove --boundary and add A, B to the result manually.\n> That still leaves the missing results, though.\n\nAh, the missing results are commits that both are part of the set of\ncommits and are heads...\nSo all in all --ancestry-path works for my use case, but I need\npost-processing.\n\nMike\n"}]}