threads / discuss / 9201

rfe: bisecting with a tristate

Subject: rfe: bisecting with a tristate

## tl;dr

6 messages between Jul 24, 2007 and Jul 24, 2007.

replies: 5people: 4as markdown or json

Jan Engelhardt· Jul 24, 2007, 13:21 UTC · lore
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· Jul 24, 2007, 13:40 UTC · re: Jan Engelhardt · lore

Re: rfe: bisecting with a tristate

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

Hi Jan,
Show 13 quoted lines
> 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.

Show 11 quoted lines
> 
> 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· Jul 24, 2007, 13:52 UTC · re: Sean · lore

Re: rfe: bisecting with a tristate

Hi,
On Tue, 24 Jul 2007, Sean wrote:
Show 14 quoted lines
> > 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· Jul 24, 2007, 17:07 UTC · re: Johannes Schindelin · lore

Re: rfe: bisecting with a tristate

tisdag 24 juli 2007 skrev Johannes Schindelin:
Show 20 quoted lines
> 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· Jul 24, 2007, 17:21 UTC · re: Robin Rosenberg · lore

Re: rfe: bisecting with a tristate

Hi,
On Tue, 24 Jul 2007, Robin Rosenberg wrote:
Show 24 quoted lines
> 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· Jul 24, 2007, 21:39 UTC · re: Johannes Schindelin · lore

Re: rfe: bisecting with a tristate

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 ;-)
 
Show 10 quoted lines
> 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

← back to recent threads