git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Robert P. J. Day <rpjday@crashcourse.ca>
Date
Nov 11, 2017, 16:03 UTC
Message-ID
<alpine.LFD.2.21.1711111101370.11260@localhost.localdomain>
In-Reply-To
<xmqq8tfcevev.fsf@gitster.mtv.corp.google.com>
On Sat, 11 Nov 2017, Junio C Hamano wrote:
Show 12 quoted lines
> Christian Couder <christian.couder@gmail.com> 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
========================================================================
Previous: Kaartic SivaraamNext: Stephan Beyer
Message 6 of 7 in “"git bisect" takes exactly one bad commit and one or more good?”
  1. Robert P. J. DayNov 11, 2017
  2. Christian CouderNov 11, 2017
  3. Junio C HamanoNov 11, 2017
  4. Robert P. J. DayNov 11, 2017
  5. Kaartic SivaraamNov 12, 2017
  6. Robert P. J. DayNov 11, 2017
  7. Stephan BeyerNov 12, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.