[BUG] git bisect start gives incorrect error message when good/bad swapped

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When good/bad are entirely swapped git bisect says:

     $ git bisect start initial_commit latest_master_commit
     Some good revs are not ancestors of the bad rev.
     git bisect cannot work properly in this case.
     Maybe you mistook good and bad revs?

But that's not true because when good is a non-ancestor from a branch
a common ancestor is automatically selected:

     $ git bisect start latest_master_commit latest_unmerged_branch_commit
     Bisecting: a merge base must be tested
     [b93212577c2e8603ed7285b55a0931dcf552c628] I'm yet another test commit

In this case latest_unmerged_branch_commit is not an ancestor of
latest_master_commit but a common ancestor is selected automatically
with a message, and when the branch point is marked as bad git
correctly indicates that the problem has been fixed on the branch (and
bisection stops):

     $ git bisect bad
     The merge base b93212577c2e8603ed7285b55a0931dcf552c628 is bad.
     This means the bug has been fixed between
b93212577c2e8603ed7285b55a0931dcf552c628 and
[1b4470e66cb26244be9aa5f68cca042a0ef4270e].

I suspect what the message at the top should be saying is that the bad
rev *is* an ancestor of some good rev but I haven't thought/tested
carefully enough to feel sure that's the case.

I think this is worth fixing somehow because the wrong message gives a
wrong idea of git capabilities and might make the case when a common
ancestor is automatically selected more unexpected and so more
confusing.

On a more minor note the use of 'merge base' to refer to the common
ancestor is unfortunate since these messages are produced when working
on branches that aren't actually merged.  It would be better to use
'common ancestor' (as the merge-base man page does).

Britton




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux