1

I'm using git bisect to find a bad commit for linux boot failure.

And the current known bad commit is :

commit 0f3f4fef3520fe888303886b62224bac7a837cac
Author: Darren Hart <dvhart@linux.intel.com>
Date:   Mon Mar 2 09:06:39 2015 -0800

Add manifest for 2015-03-02

The known good commit is:

commit 857a433072364883be5e4a7e30b895360999c8ab
Merge: d6182fe 0e28b83
Author: Darren Hart <dvhart@linux.intel.com>
Date:   Mon Feb 23 17:11:35 2015 -0800

Merge commit '0e28b83bcbf60b2485f55ec71ce540f9153725d4'

Thus I type:

[root@localhost linux]# git bisect start
[root@localhost linux]#

[root@localhost linux]# git bisect good 857a433072364883be5e4a7e30b895360999c8ab

[root@localhost linux]# git bisect bad 0f3f4fef3520fe888303886b62224bac7a837cac
Bisecting: a merge base must be tested
[c517d838eb7d07bbe9507871fab3931deccff539] 
Linux 4.0-rc1

And the test commit id is in:

[root@localhost linux]# git log
commit c517d838eb7d07bbe9507871fab3931deccff539
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Sun Feb 22 18:21:14 2015 -0800

Linux 4.0-rc1

which is ahead of the good commit:

commit 857a433072364883be5e4a7e30b895360999c8ab
Date:   Mon Feb 23 17:11:35 2015 -0800

I think bisect will never find the bad commit.

Did I miss something?

Robin Green
  • 32,079
  • 16
  • 104
  • 187
Chen
  • 105
  • 6

1 Answers1

1

I think I've got the answer, it is caused by git rebase:

Assume the following history exists and the current branch is "topic":

      A---B---C topic
     /
D---E---F---G master

From this point, the result of following command:

git rebase master

would be:

              A'--B'--C' topic
             /
D---E---F---G master

So, B disappeared. If B is a good commit, and after rebase, we find that C' is a bad commit, the following command:

git bisect start
git bisect good B
git bisect bad C'

would generate a test commit before B, for example:E.

Chen
  • 105
  • 6