# rfe: bisecting with a tristate

6 messages from 2007-07-24 to 2007-07-24. Participants: Jan Engelhardt, Sean, Johannes Schindelin, Robin Rosenberg.
Thread: https://gitlist.dev/t/9201

## Jan Engelhardt, 2007-07-24 13:21

Subject: rfe: bisecting with a tristate
Message-ID: <Pine.LNX.4.64.0707241459460.18990@fbirervta.pbzchgretzou.qr>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0707241459460.18990%40fbirervta.pbzchgretzou.qr

```
Hi,


I have an idea about handling commits that do not compile at 
all in git-bisect.
For example:

git bisect start
git bisect bad v2.6.23-rc1
# bad: [f695baf2df9e0413d3521661070103711545207a] Linux 2.6.23-rc1
git bisect good v2.6.22
# good: [098fd16f00005f665d3baa7e682d8cb3d7c0fe6f] Linux 2.6.22

Then 1f1c2881f673671539b25686df463518d69c4649 will be the next commit 
git bisect hands out. Now let's assume this commit would not compile. 
What would the user do? git-bisect good or git-bisect bad?

Assume a commit previous to 1f..49 caused an oops (but the user does not 
know yet), and the user said 'good' on 1f..49 because he did not know 
what to say (since it did not compile). Then bisect would go the wrong 
way, marking all left to 1f..49 as good.


Ideally, there should be like "git bisect dunno-try-left" and "git 
bisect dunno-try-right", which allow the user to skip checking 1f..49 
and instead try the next commit left or right of 1f..49 (to either go to 
a commit before the compile failure, or after it).

[ What's `git-bisect next` for? ]



	Jan
-- 

```

## Sean, 2007-07-24 13:40

Subject: Re: rfe: bisecting with a tristate
Message-ID: <20070724094017.d14688e5.seanlkml@sympatico.ca>
URL: https://gitlist.dev/e/20070724094017.d14688e5.seanlkml%40sympatico.ca
In-Reply-To: <Pine.LNX.4.64.0707241459460.18990@fbirervta.pbzchgretzou.qr>

```
On Tue, 24 Jul 2007 15:21:19 +0200 (CEST)
Jan Engelhardt <jengelh@computergmbh.de> wrote:


Hi Jan,

> I have an idea about handling commits that do not compile at 
> all in git-bisect.
> For example:
> 
> git bisect start
> git bisect bad v2.6.23-rc1
> # bad: [f695baf2df9e0413d3521661070103711545207a] Linux 2.6.23-rc1
> git bisect good v2.6.22
> # good: [098fd16f00005f665d3baa7e682d8cb3d7c0fe6f] Linux 2.6.22
> 
> Then 1f1c2881f673671539b25686df463518d69c4649 will be the next commit 
> git bisect hands out. Now let's assume this commit would not compile. 
> What would the user do? git-bisect good or git-bisect bad?

Check out the section "Avoiding to test a commit" in the git-bisect
man page; it addresses this issue.  Basically you just use git-reset
to pick a different nearby commit to compile, and then continue with
git bisect good/bad.

> 
> Assume a commit previous to 1f..49 caused an oops (but the user does not 
> know yet), and the user said 'good' on 1f..49 because he did not know 
> what to say (since it did not compile). Then bisect would go the wrong 
> way, marking all left to 1f..49 as good.
> 
> Ideally, there should be like "git bisect dunno-try-left" and "git 
> bisect dunno-try-right", which allow the user to skip checking 1f..49 
> and instead try the next commit left or right of 1f..49 (to either go to 
> a commit before the compile failure, or after it).
>

Sean

```

## Johannes Schindelin, 2007-07-24 13:52

Subject: Re: rfe: bisecting with a tristate
Message-ID: <Pine.LNX.4.64.0707241447200.14781@racer.site>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0707241447200.14781%40racer.site
In-Reply-To: <20070724094017.d14688e5.seanlkml@sympatico.ca>

```
Hi,

On Tue, 24 Jul 2007, Sean wrote:

> > git bisect start
> > git bisect bad v2.6.23-rc1
> > # bad: [f695baf2df9e0413d3521661070103711545207a] Linux 2.6.23-rc1
> > git bisect good v2.6.22
> > # good: [098fd16f00005f665d3baa7e682d8cb3d7c0fe6f] Linux 2.6.22
> > 
> > Then 1f1c2881f673671539b25686df463518d69c4649 will be the next commit 
> > git bisect hands out. Now let's assume this commit would not compile. 
> > What would the user do? git-bisect good or git-bisect bad?
> 
> Check out the section "Avoiding to test a commit" in the git-bisect
> man page; it addresses this issue.  Basically you just use git-reset
> to pick a different nearby commit to compile, and then continue with
> git bisect good/bad.

But a "git bisect dunno" would be handy.

However, it is a bit involved, since git-bisect.sh assumes that there is 
only one bad commit, and with that, the outcome would be possibly a commit 
range.

Two parts to it I see:

- builtin-rev-list.c:find_bisection() has to be told to ignore the dunno 
  commits when counting, in addition to uninteresting ones (but not stop 
  traversal). The easiest way I could see would be to add another option 
  to specify the dunno commits, and set a special flag on these.

- git-bisect.sh has to lose the assumption that there is only one bad 
  commit.  Instead, it has to traverse the parent(s) of "the" bad commit, 
  until it finds either no parents, or a known good one.  So maybe 
  something like

	echo $(git rev-list --boundary $bad --not $good |
		sed -n "s/^-/^/p") $bad

  would be enough.

Hth,
Dscho

```

## Robin Rosenberg, 2007-07-24 17:07

Subject: Re: rfe: bisecting with a tristate
Message-ID: <200707241907.57857.robin.rosenberg.lists@dewire.com>
URL: https://gitlist.dev/e/200707241907.57857.robin.rosenberg.lists%40dewire.com
In-Reply-To: <Pine.LNX.4.64.0707241447200.14781@racer.site>

```
tisdag 24 juli 2007 skrev Johannes Schindelin:
> Hi,
> 
> On Tue, 24 Jul 2007, Sean wrote:
> 
> > > git bisect start
> > > git bisect bad v2.6.23-rc1
> > > # bad: [f695baf2df9e0413d3521661070103711545207a] Linux 2.6.23-rc1
> > > git bisect good v2.6.22
> > > # good: [098fd16f00005f665d3baa7e682d8cb3d7c0fe6f] Linux 2.6.22
> > > 
> > > Then 1f1c2881f673671539b25686df463518d69c4649 will be the next commit 
> > > git bisect hands out. Now let's assume this commit would not compile. 
> > > What would the user do? git-bisect good or git-bisect bad?
> > 
> > Check out the section "Avoiding to test a commit" in the git-bisect
> > man page; it addresses this issue.  Basically you just use git-reset
> > to pick a different nearby commit to compile, and then continue with
> > git bisect good/bad.
> 
> But a "git bisect dunno" would be handy.

Why? Not doing anything is enough, just select a new commit. Going back can be done by
git reset, but forward (towards original HEAD) requires more thinking so a git bisect forward [n]
would help there.

-- robin

```

## Johannes Schindelin, 2007-07-24 17:21

Subject: Re: rfe: bisecting with a tristate
Message-ID: <Pine.LNX.4.64.0707241818450.14781@racer.site>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0707241818450.14781%40racer.site
In-Reply-To: <200707241907.57857.robin.rosenberg.lists@dewire.com>

```
Hi,

On Tue, 24 Jul 2007, Robin Rosenberg wrote:

> tisdag 24 juli 2007 skrev Johannes Schindelin:
> 
> > On Tue, 24 Jul 2007, Sean wrote:
> > 
> > > > git bisect start
> > > > git bisect bad v2.6.23-rc1
> > > > # bad: [f695baf2df9e0413d3521661070103711545207a] Linux 2.6.23-rc1
> > > > git bisect good v2.6.22
> > > > # good: [098fd16f00005f665d3baa7e682d8cb3d7c0fe6f] Linux 2.6.22
> > > > 
> > > > Then 1f1c2881f673671539b25686df463518d69c4649 will be the next commit 
> > > > git bisect hands out. Now let's assume this commit would not compile. 
> > > > What would the user do? git-bisect good or git-bisect bad?
> > > 
> > > Check out the section "Avoiding to test a commit" in the git-bisect
> > > man page; it addresses this issue.  Basically you just use git-reset
> > > to pick a different nearby commit to compile, and then continue with
> > > git bisect good/bad.
> > 
> > But a "git bisect dunno" would be handy.
> 
> Why? Not doing anything is enough, just select a new commit. Going back 
> can be done by git reset, but forward (towards original HEAD) requires 
> more thinking so a git bisect forward [n] would help there.

And why exactly do you want to make it hard on the user?

Imagine this history:

	A - B - broken - bad - C

Now you bisect.  It goes to "broken".  You compile.  Darn, does not 
compile.  Why not have a "git bisect dunno", which considers only the 
_rest_ of the commits for the next bisection point?  When it finally found 
the "bad" one, it has to say it broke somewhere between "B..bad".

Now that would be user friendly, wouldn't it?

Ciao,
Dscho

```

## Robin Rosenberg, 2007-07-24 21:39

Subject: Re: rfe: bisecting with a tristate
Message-ID: <200707242339.07980.robin.rosenberg.lists@dewire.com>
URL: https://gitlist.dev/e/200707242339.07980.robin.rosenberg.lists%40dewire.com
In-Reply-To: <Pine.LNX.4.64.0707241818450.14781@racer.site>

```
tisdag 24 juli 2007 skrev Johannes Schindelin:
> And why exactly do you want to make it hard on the user?

Nah, I don't want to do that. Just thinking aloud ;-)
 
> Imagine this history:
> 
> 	A - B - broken - bad - C
> 
> Now you bisect.  It goes to "broken".  You compile.  Darn, does not 
> compile.  Why not have a "git bisect dunno", which considers only the 
> _rest_ of the commits for the next bisection point?  When it finally found 
> the "bad" one, it has to say it broke somewhere between "B..bad".
> 
> Now that would be user friendly, wouldn't it?

It would work fine.

-- robin

```
