Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

repo 'bisect' for debugging Android?

git bisect works by counting the number of commits between 'good' and 'bad' and checking out the change in the middle. Unfortunately this wouldn't work well for repo because one project (e.g. framework) may have a lot of changes early on and another project (e.g. kernel) may have a bunch of later changes, so 'repo forall -c "git bisect ..."' could have one project checked out in a state a lot older than an other.

My question is whether there is a way to get git-bisect to choose its commit based on the date of the commit, so when done across projects we're most likely to be left in a state that compiles cleanly.

like image 747
Grazfather Avatar asked Mar 14 '12 22:03

Grazfather


1 Answers

git bisect is not designed to be used across multiple repositories simultaneously.

You'd probably be better of writing your own script that implements a basic bisection algorithm across date ranges, and use git rev-list -n1 --before <DATEVALUE> in each repository to obtain a git commit to check out corresponding to whatever date your script is currently bisecting.

Here's an example bisection script that I had written for another purpose. Note that it is not specifically designed for your situation; it's just an example of implementing bisection:

https://gist.github.com/2040290

like image 89
Amber Avatar answered Sep 27 '22 20:09

Amber