{"thread":{"id":"57982","subject":"git bisect outputs list of commits in the wrong order","startedAt":"2022-06-10T16:01:29Z","lastAt":"2022-06-10T18:33:15Z","messageCount":4,"participants":["Volker Weißmann","Junio C Hamano","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"457029","messageId":"3352fbbd-d555-fc51-1eac-692fdb5e4ae0@gmx.de","threadId":"57982","inReplyTo":null,"subject":"git bisect outputs list of commits in the wrong order","fromName":"Volker Weißmann","fromEmail":"volker.weissmann@gmx.de","sentAt":"2022-06-10T16:01:21Z","receivedAt":"2022-06-10T16:01:29Z","isPatch":false,"sender":{"key":"volker.weissmann@gmx.de","avatar":null},"body":"If you use `git bisect` and `git bisect skip`, you might get an output\nlike this:\n\nThere are only 'skip'ped commits left to test.\nThe first bad commit could be any of:\n01f793267a9af328f0f1af2cdb88301a08f007b2\na87784e29411e8b08059fdc79629e64de3002c99\naf0df663440796a0580644493c15290405e60ecd\n4f34b8cd48e2a814263efb319fe5dbab91215aed\nf3d91e38a45f0a2ec5affb884d536c9c4e5bb290\n13526e1b0e1b11a2e30e44ccf35fbf92ffb61372\nabee97622db5301d593265ff6e2009777b09221e\nb63700f09a422f01d954967b84c5e662881352eb\nWe cannot bisect more!\n\nWhile the output is correct, I don't like the fact that the commits are\nnot in chronological order. Is there a reason for this? Chronological\norder makes sense and would make it easier to find the first known bad\nand the last known good commit.\n\n"},{"id":"457036","messageId":"xmqqsfoce8d7.fsf@gitster.g","threadId":"57982","inReplyTo":"3352fbbd-d555-fc51-1eac-692fdb5e4ae0@gmx.de","subject":"Re: git bisect outputs list of commits in the wrong order","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2022-06-10T17:28:04Z","receivedAt":"2022-06-10T17:28:16Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Volker Weißmann <volker.weissmann@gmx.de> writes:\n\n> If you use `git bisect` and `git bisect skip`, you might get an output\n> like this:\n>\n> There are only 'skip'ped commits left to test.\n> The first bad commit could be any of:\n> 01f793267a9af328f0f1af2cdb88301a08f007b2\n> a87784e29411e8b08059fdc79629e64de3002c99\n> af0df663440796a0580644493c15290405e60ecd\n> 4f34b8cd48e2a814263efb319fe5dbab91215aed\n> f3d91e38a45f0a2ec5affb884d536c9c4e5bb290\n> 13526e1b0e1b11a2e30e44ccf35fbf92ffb61372\n> abee97622db5301d593265ff6e2009777b09221e\n> b63700f09a422f01d954967b84c5e662881352eb\n> We cannot bisect more!\n>\n> While the output is correct, I don't like the fact that the commits are\n> not in chronological order. Is there a reason for this? Chronological\n> order makes sense and would make it easier to find the first known bad\n> and the last known good commit.\n\nThanks for a report.\n\nI looked at an \"scripted\" version in the ancient past and it seems\nto have computed by iterating over\n\n\tgit rev-list bisect/bad --not $good_revs\n\nwhich would have given these intermediate ones roughly in the\nreverse chronological order.  It could be that the behaviour\nregressed when the scripted version was rewritten in C, but I dunno.\n\nChristian (as an \"area\" expert for bisect), do you have any\ncomments?\n\nThanks.\n\n\n\n"},{"id":"457039","messageId":"YqOJQKSH4eTo4cGn@coredump.intra.peff.net","threadId":"57982","inReplyTo":"xmqqsfoce8d7.fsf@gitster.g","subject":"Re: git bisect outputs list of commits in the wrong order","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2022-06-10T18:11:12Z","receivedAt":"2022-06-10T18:11:18Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Jun 10, 2022 at 10:28:04AM -0700, Junio C Hamano wrote:\n\n> I looked at an \"scripted\" version in the ancient past and it seems\n> to have computed by iterating over\n> \n> \tgit rev-list bisect/bad --not $good_revs\n> \n> which would have given these intermediate ones roughly in the\n> reverse chronological order.  It could be that the behaviour\n> regressed when the scripted version was rewritten in C, but I dunno.\n> \n> Christian (as an \"area\" expert for bisect), do you have any\n> comments?\n\nIt would probably be nice to show them as --oneline, as well. I'd guess\nthat a human reading the subjects of a handful of commits could quickly\nmake a good guess as to the actual culprit.\n\n-Peff\n"},{"id":"457040","messageId":"xmqqmteke5cv.fsf@gitster.g","threadId":"57982","inReplyTo":"YqOJQKSH4eTo4cGn@coredump.intra.peff.net","subject":"Re: git bisect outputs list of commits in the wrong order","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2022-06-10T18:33:04Z","receivedAt":"2022-06-10T18:33:15Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> On Fri, Jun 10, 2022 at 10:28:04AM -0700, Junio C Hamano wrote:\n>\n>> I looked at an \"scripted\" version in the ancient past and it seems\n>> to have computed by iterating over\n>> \n>> \tgit rev-list bisect/bad --not $good_revs\n>> \n>> which would have given these intermediate ones roughly in the\n>> reverse chronological order.  It could be that the behaviour\n>> regressed when the scripted version was rewritten in C, but I dunno.\n>> \n>> Christian (as an \"area\" expert for bisect), do you have any\n>> comments?\n>\n> It would probably be nice to show them as --oneline, as well. I'd guess\n> that a human reading the subjects of a handful of commits could quickly\n> make a good guess as to the actual culprit.\n\nTrue, too.\n\nThe scripted version fed the output from above iteration each to\n\"show-branch\" (as \"git log --oneline\" was probably not so widely\nused or may not have been available back then), to make them human\nreadable.  We should be able to use pretty.c::pretty_print_commit()\nwith CMT_FMT_ONELINE to do that more easily these days.\n\nBy the way, welcome back ;-)\n\n\n"}]}