{"thread":{"id":"60601","subject":"[BUG] git bisect start gives incorrect error message when good/bad swapped","startedAt":"2023-12-11T06:21:05Z","lastAt":"2023-12-11T06:21:05Z","messageCount":1,"participants":["Britton Kerin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"485511","messageId":"CAC4O8c-KmafnX2z_6JK5YxjWcegykwZvk9xx2OuYdLLR5gVk_g@mail.gmail.com","threadId":"60601","inReplyTo":null,"subject":"[BUG] git bisect start gives incorrect error message when good/bad swapped","fromName":"Britton Kerin","fromEmail":"britton.kerin@gmail.com","sentAt":"2023-12-11T06:20:51Z","receivedAt":"2023-12-11T06:21:05Z","isPatch":false,"sender":{"key":"britton.kerin@gmail.com","avatar":"https://avatars.githubusercontent.com/u/7434164?v=4"},"body":"When good/bad are entirely swapped git bisect says:\n\n     $ git bisect start initial_commit latest_master_commit\n     Some good revs are not ancestors of the bad rev.\n     git bisect cannot work properly in this case.\n     Maybe you mistook good and bad revs?\n\nBut that's not true because when good is a non-ancestor from a branch\na common ancestor is automatically selected:\n\n     $ git bisect start latest_master_commit latest_unmerged_branch_commit\n     Bisecting: a merge base must be tested\n     [b93212577c2e8603ed7285b55a0931dcf552c628] I'm yet another test commit\n\nIn this case latest_unmerged_branch_commit is not an ancestor of\nlatest_master_commit but a common ancestor is selected automatically\nwith a message, and when the branch point is marked as bad git\ncorrectly indicates that the problem has been fixed on the branch (and\nbisection stops):\n\n     $ git bisect bad\n     The merge base b93212577c2e8603ed7285b55a0931dcf552c628 is bad.\n     This means the bug has been fixed between\nb93212577c2e8603ed7285b55a0931dcf552c628 and\n[1b4470e66cb26244be9aa5f68cca042a0ef4270e].\n\nI suspect what the message at the top should be saying is that the bad\nrev *is* an ancestor of some good rev but I haven't thought/tested\ncarefully enough to feel sure that's the case.\n\nI think this is worth fixing somehow because the wrong message gives a\nwrong idea of git capabilities and might make the case when a common\nancestor is automatically selected more unexpected and so more\nconfusing.\n\nOn a more minor note the use of 'merge base' to refer to the common\nancestor is unfortunate since these messages are produced when working\non branches that aren't actually merged.  It would be better to use\n'common ancestor' (as the merge-base man page does).\n\nBritton\n"}]}