Skip to content
  • Chris Down's avatar
    bisect: output state before we are ready to compute bisection · 0cf1defa
    Chris Down authored and Junio C Hamano's avatar Junio C Hamano committed
    Commit 73c6de06
    
     ("bisect: don't use invalid oid as rev when
    starting") changes the behaviour of `git bisect` to consider invalid
    oids as pathspecs again, as in the old shell implementation.
    
    While that behaviour may be desirable, it can also cause confusion. For
    example, while bisecting in a particular repo I encountered this:
    
        $ git bisect start d93ff48803f0 v6.3
        $
    
    ...which led to me sitting for a few moments, wondering why there's no
    printout stating the first rev to check.
    
    It turns out that the tag was actually "6.3", not "v6.3", and thus the
    bisect was still silently started with only a bad rev, because
    d93ff48803f0 was a valid oid and "v6.3" was silently considered to be a
    pathspec.
    
    While this behaviour may be desirable, it can be confusing, especially
    with different repo conventions either using or not using "v" before
    release names, or when a branch name or tag is simply misspelled on the
    command line.
    
    In order to avoid situations like this, make it more clear what we're
    waiting for:
    
        $ git bisect start d93ff48803f0 v6.3
        status: waiting for good commit(s), bad commit known
    
    We already have good output once the bisect process has begun in
    earnest, so we don't need to do anything more there.
    
    Signed-off-by: default avatarChris Down <chris@chrisdown.name>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    0cf1defa