Web lists-archives.com

Re: "git bisect" takes exactly one bad commit and one or more good?




On Sat, 11 Nov 2017, Junio C Hamano wrote:

> Christian Couder <christian.couder@xxxxxxxxx> writes:
>
> >> "You use it by first telling it a "bad" commit that is known to
> >> contain the bug, and a "good" commit that is known to be before the
> >> bug was introduced."
> >
> > Yeah, 'and at least a "good" commit' would be better.
>
> Make it "at least one" instead, perhaps?
>
> I somehow thought that you technically could force bisection with 0
> good commit, even though no sane person would do so...

  i do see the following snippet in bisect_next_check():

  bisect_next_check() {

  ... snip ...

        case "$missing_good,$missing_bad,$1" in
        ,,*)
                : have both $TERM_GOOD and $TERM_BAD - ok
                ;;
        *,)
                # do not have both but not asked to fail - just report.
                false
                ;;
        t,,"$TERM_GOOD")
                # have bad (or new) but not good (or old).  we could bisect although
                # this is less optimum.
                eval_gettextln "Warning: bisecting only with a \$TERM_BAD commit." >&2

  ... snip ...

so i guess it's possible.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================