git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* rfe: bisecting with a tristate
@ 2007-07-24 13:21 Jan Engelhardt
  2007-07-24 13:40 ` Sean
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Engelhardt @ 2007-07-24 13:21 UTC (permalink / raw)
  To: git

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
-- 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: rfe: bisecting with a tristate
  2007-07-24 13:21 rfe: bisecting with a tristate Jan Engelhardt
@ 2007-07-24 13:40 ` Sean
  2007-07-24 13:52   ` Johannes Schindelin
  0 siblings, 1 reply; 6+ messages in thread
From: Sean @ 2007-07-24 13:40 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: git

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: rfe: bisecting with a tristate
  2007-07-24 13:40 ` Sean
@ 2007-07-24 13:52   ` Johannes Schindelin
  2007-07-24 17:07     ` Robin Rosenberg
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Schindelin @ 2007-07-24 13:52 UTC (permalink / raw)
  To: Sean; +Cc: Jan Engelhardt, git

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: rfe: bisecting with a tristate
  2007-07-24 13:52   ` Johannes Schindelin
@ 2007-07-24 17:07     ` Robin Rosenberg
  2007-07-24 17:21       ` Johannes Schindelin
  0 siblings, 1 reply; 6+ messages in thread
From: Robin Rosenberg @ 2007-07-24 17:07 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Sean, Jan Engelhardt, git

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: rfe: bisecting with a tristate
  2007-07-24 17:07     ` Robin Rosenberg
@ 2007-07-24 17:21       ` Johannes Schindelin
  2007-07-24 21:39         ` Robin Rosenberg
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Schindelin @ 2007-07-24 17:21 UTC (permalink / raw)
  To: Robin Rosenberg; +Cc: Sean, Jan Engelhardt, git

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: rfe: bisecting with a tristate
  2007-07-24 17:21       ` Johannes Schindelin
@ 2007-07-24 21:39         ` Robin Rosenberg
  0 siblings, 0 replies; 6+ messages in thread
From: Robin Rosenberg @ 2007-07-24 21:39 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Sean, Jan Engelhardt, git

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-07-24 21:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-24 13:21 rfe: bisecting with a tristate Jan Engelhardt
2007-07-24 13:40 ` Sean
2007-07-24 13:52   ` Johannes Schindelin
2007-07-24 17:07     ` Robin Rosenberg
2007-07-24 17:21       ` Johannes Schindelin
2007-07-24 21:39         ` Robin Rosenberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).