{"thread":{"id":"47797","subject":"\"git bisect run make\" adequate to locate first unbuildable commit?","startedAt":"2018-02-09T13:20:32Z","lastAt":"2018-02-13T12:41:59Z","messageCount":8,"participants":["Robert P. J. Day","Christian Couder","Philip Oakley, CEng MIET","Philip Oakley","SZEDER Gábor"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"338867","messageId":"alpine.LFD.2.21.1802090817550.6248@android-a172fe96dd584b41","threadId":"47797","inReplyTo":null,"subject":"\"git bisect run make\" adequate to locate first unbuildable commit?","fromName":"Robert P. J. Day","fromEmail":"rpjday@crashcourse.ca","sentAt":"2018-02-09T13:20:24Z","receivedAt":"2018-02-09T13:20:32Z","isPatch":false,"sender":{"key":"rpjday@crashcourse.ca","avatar":"https://avatars.githubusercontent.com/u/226084077?v=4"},"body":"\n  writing a short tutorial on \"git bisect\" and, all the details of\nspecial exit code 125 aside, if one wanted to locate the first\nunbuildable commit, would it be sufficient to just run?\n\n  $ git bisect run make\n\n  as i read it, make returns either 0, 1 or 2 so there doesn't appear\nto be any possibility of weirdness with clashing with a 125 exit code.\nam i overlooking some subtle detail here i should be aware of? thanks.\n\nrday\n"},{"id":"338876","messageId":"CAP8UFD2HGVQSnMrG4-eABv104Og1JBbUfTd7TvpP8sT30AXbEA@mail.gmail.com","threadId":"47797","inReplyTo":"alpine.LFD.2.21.1802090817550.6248@android-a172fe96dd584b41","subject":"Re: \"git bisect run make\" adequate to locate first unbuildable commit?","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2018-02-09T13:47:36Z","receivedAt":"2018-02-09T13:47:44Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Fri, Feb 9, 2018 at 2:20 PM, Robert P. J. Day <rpjday@crashcourse.ca> wrote:\n>\n>   writing a short tutorial on \"git bisect\" and, all the details of\n> special exit code 125 aside, if one wanted to locate the first\n> unbuildable commit, would it be sufficient to just run?\n>\n>   $ git bisect run make\n>\n>   as i read it, make returns either 0, 1 or 2 so there doesn't appear\n> to be any possibility of weirdness with clashing with a 125 exit code.\n> am i overlooking some subtle detail here i should be aware of? thanks.\n\nI think you are not overlooking anything.\n"},{"id":"338929","messageId":"alpine.LFD.2.21.1802091553290.17104@localhost.localdomain","threadId":"47797","inReplyTo":"9803DEA99A6545F7A3F9A3CE08FE2263@PhilipOakley","subject":"Re: \"git bisect run make\" adequate to locate first unbuildable commit?","fromName":"Robert P. J. Day","fromEmail":"rpjday@crashcourse.ca","sentAt":"2018-02-09T20:54:37Z","receivedAt":"2018-02-09T20:54:46Z","isPatch":false,"sender":{"key":"rpjday@crashcourse.ca","avatar":"https://avatars.githubusercontent.com/u/226084077?v=4"},"body":"On Fri, 9 Feb 2018, Philip Oakley, CEng MIET wrote:\n\n> From: \"Robert P. J. Day\" <rpjday@crashcourse.ca>\n> >\n> > writing a short tutorial on \"git bisect\" and, all the details of\n> > special exit code 125 aside, if one wanted to locate the first\n> > unbuildable commit, would it be sufficient to just run?\n> >\n> >  $ git bisect run make\n> >\n> > as i read it, make returns either 0, 1 or 2 so there doesn't appear\n> > to be any possibility of weirdness with clashing with a 125 exit code.\n> > am i overlooking some subtle detail here i should be aware of? thanks.\n> >\n> > rday\n>\n> In the spirit of pedanticism, one should also clarify the word\n> \"first\", in that it's not a linear search for _an_ unbuildable\n> commit, but that one is looking for the transition between an\n> unbroken sequence of unbuildable commits, which transitions to\n> buildable commits, and its the transition that is sought. (there\n> could be many random unbuildable commits within a sequence in some\n> folks' processes!)\n\n  quite so, i should have been more precise.\n\nrday\n"},{"id":"338930","messageId":"9803DEA99A6545F7A3F9A3CE08FE2263@PhilipOakley","threadId":"47797","inReplyTo":"alpine.LFD.2.21.1802090817550.6248@android-a172fe96dd584b41","subject":"Re: \"git bisect run make\" adequate to locate first unbuildable commit?","fromName":"Philip Oakley, CEng MIET","fromEmail":"philipoakley@theiet.org","sentAt":null,"receivedAt":"2018-02-09T20:57:11Z","isPatch":false,"sender":{"key":"philipoakley@theiet.org","avatar":null},"body":"From: \"Robert P. J. Day\" <rpjday@crashcourse.ca>\n>\n>  writing a short tutorial on \"git bisect\" and, all the details of\n> special exit code 125 aside, if one wanted to locate the first\n> unbuildable commit, would it be sufficient to just run?\n>\n>  $ git bisect run make\n>\n>  as i read it, make returns either 0, 1 or 2 so there doesn't appear\n> to be any possibility of weirdness with clashing with a 125 exit code.\n> am i overlooking some subtle detail here i should be aware of? thanks.\n>\n> rday\n>\n\nIn the spirit of pedanticism, one should also clarify the word \"first\", in \nthat it's not a linear search for _an_ unbuildable commit, but that one is \nlooking for the transition between an unbroken sequence of unbuildable \ncommits, which transitions to buildable commits, and its the transition that \nis sought. (there could be many random unbuildable commits within a sequence \nin some folks' processes!)\n--\nPhilip \n\n"},{"id":"338951","messageId":"7135CFE5288C49EEA02785C1F407B46D@PhilipOakley","threadId":"47797","inReplyTo":"alpine.LFD.2.21.1802091553290.17104@localhost.localdomain","subject":"Re: \"git bisect run make\" adequate to locate first unbuildable commit?","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.org","sentAt":null,"receivedAt":"2018-02-09T22:44:18Z","isPatch":false,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"From: \"Robert P. J. Day\" <rpjday@crashcourse.ca>\n> On Fri, 9 Feb 2018, Philip Oakley, CEng MIET wrote:\n(apologies for using the fancy letters after the name ID...)\n>\n>> From: \"Robert P. J. Day\" <rpjday@crashcourse.ca>\n>> >\n>> > writing a short tutorial on \"git bisect\" and, all the details of\n>> > special exit code 125 aside, if one wanted to locate the first\n>> > unbuildable commit, would it be sufficient to just run?\n>> >\n>> >  $ git bisect run make\n>> >\n>> > as i read it, make returns either 0, 1 or 2 so there doesn't appear\n>> > to be any possibility of weirdness with clashing with a 125 exit code.\n>> > am i overlooking some subtle detail here i should be aware of? thanks.\n>> >\n>> > rday\n>>\n>> In the spirit of pedanticism, one should also clarify the word\n>> \"first\", in that it's not a linear search for _an_ unbuildable\n>> commit, but that one is looking for the transition between an\n>> unbroken sequence of unbuildable commits, which transitions to\n>> buildable commits, and its the transition that is sought. (there\n>> could be many random unbuildable commits within a sequence in some\n>> folks' processes!)\n>\n>  quite so, i should have been more precise.\n>\n> rday\n\nThe other two things that may be happening (in the wider bisect discussion) \nthat I've heard of are:\n1. there may be feature branches that bypass the known good starting commit, \nwhich can cause understanding issues as those side branches that predate the \nstart point are also considered potential bu commits.\n2. if you just want the first parent check for the bad commit point, that \nmark the second parents of merges as being good.\n\nAlso, I'd expect that the skipped commits aren't 'counted' (too hard?) for \nthe bisect algorithm's reporting.\n\nhttps://stackoverflow.com/questions/5638211/how-do-you-get-git-bisect-to-ignore-merged-branches \ncontains a number of the ideas..\n\nPhilip\n\n"},{"id":"339074","messageId":"alpine.LFD.2.21.1802120512380.17034@localhost.localdomain","threadId":"47797","inReplyTo":"7135CFE5288C49EEA02785C1F407B46D@PhilipOakley","subject":"Re: \"git bisect run make\" adequate to locate first unbuildable commit?","fromName":"Robert P. J. Day","fromEmail":"rpjday@crashcourse.ca","sentAt":"2018-02-12T10:19:41Z","receivedAt":"2018-02-12T10:19:50Z","isPatch":false,"sender":{"key":"rpjday@crashcourse.ca","avatar":"https://avatars.githubusercontent.com/u/226084077?v=4"},"body":"On Fri, 9 Feb 2018, Philip Oakley wrote:\n\n> From: \"Robert P. J. Day\" <rpjday@crashcourse.ca>\n> > On Fri, 9 Feb 2018, Philip Oakley, CEng MIET wrote:\n> (apologies for using the fancy letters after the name ID...)\n> >\n> >> From: \"Robert P. J. Day\" <rpjday@crashcourse.ca>\n> >> >\n> >> > writing a short tutorial on \"git bisect\" and, all the details\n> >> > of special exit code 125 aside, if one wanted to locate the\n> >> > first unbuildable commit, would it be sufficient to just run?\n> >> >\n> >> >  $ git bisect run make\n> >> >\n> >> > as i read it, make returns either 0, 1 or 2 so there doesn't\n> >> > appear to be any possibility of weirdness with clashing with a\n> >> > 125 exit code. am i overlooking some subtle detail here i\n> >> > should be aware of? thanks.\n> >>\n> >> In the spirit of pedanticism, one should also clarify the word\n> >> \"first\", in that it's not a linear search for _an_ unbuildable\n> >> commit, but that one is looking for the transition between an\n> >> unbroken sequence of unbuildable commits, which transitions to\n> >> buildable commits, and its the transition that is sought. (there\n> >> could be many random unbuildable commits within a sequence in\n> >> some folks' processes!)\n> >\n> >  quite so, i should have been more precise.\n> >\n> > rday\n>\n> The other two things that may be happening (in the wider bisect\n> discussion) that I've heard of are:\n\n> 1. there may be feature branches that bypass the known good starting\n>    commit, which can cause understanding issues as those side\n>    branches that predate the start point are also considered\n>    potential bu commits.\n\n  ok, but let's make sure i understand what defines a possible commit\nthat \"introduces\" the bug. if i define two bisection commits <good>\nand <bad>, then i've always assumed that what i'm after is a commit\n<X> for which:\n\n  1) <X> is reachable from <bad>\n  2) <good> is reachable from <X>\n\nthis seems fairly obvious. now, as you suggest, it's possible that the\n\"bug\" was introduced on a feature branch that bypasses my choice of\n<good> but, at *some* point, that feature branch would have to be\nmerged to the point where it was now reachable from <bad> and, in the\ncontext of bisection, *that* merge commit would represent where the\nbug was introduced, no?\n\nrday\n"},{"id":"339077","messageId":"20180212130511.32620-1-szeder.dev@gmail.com","threadId":"47797","inReplyTo":"alpine.LFD.2.21.1802120512380.17034@localhost.localdomain","subject":"Re: \"git bisect run make\" adequate to locate first unbuildable commit?","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2018-02-12T13:05:11Z","receivedAt":"2018-02-12T13:05:28Z","isPatch":false,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"\n> > 1. there may be feature branches that bypass the known good starting\n> >    commit, which can cause understanding issues as those side\n> >    branches that predate the start point are also considered\n> >    potential bu commits.\n> \n>   ok, but let's make sure i understand what defines a possible commit\n> that \"introduces\" the bug. if i define two bisection commits <good>\n> and <bad>, then i've always assumed that what i'm after is a commit\n> <X> for which:\n> \n>   1) <X> is reachable from <bad>\n>   2) <good> is reachable from <X>\n> \n> this seems fairly obvious.\n\nWell, maybe _you_ are after such a commit, but bisect is after a\ncommit <X> for which\n\n  1) <X> is reachable from <bad> (i.e. the same as your first point)\n\n  2) <X> is not reachable from <good> (which is not the same as your\n     second point, notably when it comes to commits on side branches\n     that branched off before <good> and got merged later).\n\n> now, as you suggest, it's possible that the\n> \"bug\" was introduced on a feature branch that bypasses my choice of\n> <good> but, at *some* point, that feature branch would have to be\n> merged to the point where it was now reachable from <bad> and, in the\n> context of bisection, *that* merge commit would represent where the\n> bug was introduced, no?\n\nNo.  Consider this piece of history:\n\n           <good>               <bad>\n              v                   v\n    --a---b---C---d---e---M---k---L--\n       \\                 /\n        f---g---H---i---j\n                ^\n              first\n               bad\n\nThen the command 'git bisect start L C' will first consider the\nfollowing as \"possible commit that introduces the bug\":\n\n  d e f g H i j M k L\n\n(IOW all commits listed by 'git log ^C L') and will then\nsystematically narrow down until it will find commit H as the\ntransition from good to bad.\n\n"},{"id":"339192","messageId":"alpine.LFD.2.21.1802130734550.16343@localhost.localdomain","threadId":"47797","inReplyTo":"7135CFE5288C49EEA02785C1F407B46D@PhilipOakley","subject":"Re: \"git bisect run make\" adequate to locate first unbuildable commit?","fromName":"Robert P. J. Day","fromEmail":"rpjday@crashcourse.ca","sentAt":"2018-02-13T12:41:50Z","receivedAt":"2018-02-13T12:41:59Z","isPatch":false,"sender":{"key":"rpjday@crashcourse.ca","avatar":"https://avatars.githubusercontent.com/u/226084077?v=4"},"body":"On Fri, 9 Feb 2018, Philip Oakley wrote:\n\n> From: \"Robert P. J. Day\" <rpjday@crashcourse.ca>\n> > On Fri, 9 Feb 2018, Philip Oakley, CEng MIET wrote:\n> (apologies for using the fancy letters after the name ID...)\n> >\n> >> From: \"Robert P. J. Day\" <rpjday@crashcourse.ca>\n> >> >\n> >> > writing a short tutorial on \"git bisect\" and, all the details\n> >> > of special exit code 125 aside, if one wanted to locate the\n> >> > first unbuildable commit, would it be sufficient to just run?\n> >> >\n> >> >  $ git bisect run make\n> >> >\n> >> > as i read it, make returns either 0, 1 or 2 so there doesn't\n> >> > appear to be any possibility of weirdness with clashing with a\n> >> > 125 exit code. am i overlooking some subtle detail here i\n> >> > should be aware of? thanks.\n> >> >\n> >> > rday\n> >>\n> >> In the spirit of pedanticism, one should also clarify the word\n> >> \"first\", in that it's not a linear search for _an_ unbuildable\n> >> commit, but that one is looking for the transition between an\n> >> unbroken sequence of unbuildable commits, which transitions to\n> >> buildable commits, and its the transition that is sought. (there\n> >> could be many random unbuildable commits within a sequence in\n> >> some folks' processes!)\n> >\n> >  quite so, i should have been more precise.\n> >\n> > rday\n>\n> The other two things that may be happening (in the wider bisect\n> discussion) that I've heard of are:\n\n> 1. there may be feature branches that bypass the known good starting\n>    commit, which can cause understanding issues as those side\n>    branches that predate the start point are also considered\n>    potential bu commits.\n\n  ... snip ...\n\n  sorry, i should have replied to this post since my last post\ndirectly addresses this scenario -- i believe this is precisely what\nyou were suggesting:\n\n               ... 50000 commits ... (feature branch)\n             /                      ^\n            /                        \\\n           v                          \\\n  A  <--  B <-- <GOOD> <-- D <-- E <-- F <-- <BAD>\n\n\ni'm still curious ... if one doesn't get into skipping, what is the\n\"git rev-list\" command to identify all of the possible revisions to be\ntested here? isn't it just:\n\n  $ git rev-list <BAD> ^<GOOD>\n\nor was there somthing more subtle i was missing? sorry if someone\nalready explained this, i'll go back later and read the replies in\nmore excruciating detail.\n\nrday\n\np.s. i'll take a closer look at the \"--bisect*\" options to \"git\nrev-list\" shortly.\n"}]}