There is a bug in my code which can be easily reproduced since a test fails.
Up to now I used git-bisect in such cases, but it is only useful if there is only one git repo.
In my case there are 7.
Is there a way to do something like git-bisect but for N git repositories?
There is one "container" Repo this contains mostly config. It is related to a particular customer.
Then there is one repo for the core-application.
Then where are N repos for plugins for this core-application.
Git submodules are not used in this context.
Up to now I don't use the google repo tool. AFAIK it can't bisect, too.
The git bisect command is used to discover the commit that has introduced a bug in the code. It helps track down the commit where the code works and the commit where it does not, hence, tracking down the commit that introduced the bug into the code.
To end the bisect session at any point, run git bisect reset. Mark the current commit (HEAD) as bad with git bisect bad.
git bisect help. This command uses a binary search algorithm to find which commit in your project's history introduced a bug. You use it by first telling it a "bad" commit that is known to contain the bug, and a "good" commit that is known to be before the bug was introduced.
To track down a broken commit, git gives us a very handy tool called git bisect . Git bisect does a binary search to find the broken commit.
First off : find a state when the test passed.
Then : check if the test passes when reverting one single of the 7 repositories
For example, let's say that :
the test passed when repositories were at commits :
A1 A2 A3 A4 A5 A6 A7
the test doesn't pass when all repositories are at their new HEAD :
B1 B2 B3 B4 B5 B6 B7
try to see if the test passes in the following configurations :
A1 B2 B3 B4 B5 B6 B7
B1 A2 B3 B4 B5 B6 B7
B1 B2 A3 B4 B5 B6 B7
etc ...
If you manage to isolate a single repo this way : you just have to bisect on that one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With