Home Home > 2010 > 07 > 19 > git bisect in action
Sign up | Login

Deprecation notice: openSUSE Lizards user blog platform is deprecated, and will remain read only for the time being. Learn more...

git bisect in action

July 19th, 2010 by

We have a little regression in the buildservice API test suite. And looking at the commit log I didn’t find the obvious problem, so I tried bisect, because I know it worked very recently:


git bisect start master 1dfd9717348d8425492b556d3a183b4d265007d
git bisect run sh -c "cd src/api; ruby test/functional/build_controller_test.rb --name=test_project_index"

And it gave me:
25347c2d712e6e4b598e05442dd95b5e82f14aed is the first bad commit
commit 25347c2d712e6e4b598e05442dd95b5e82f14aed
Author: Jan-Simon Möller
Date: Sun Jul 18 01:14:01 2010 +0200

[api] Add fixtures for request controller ACL tests.

Now if you look at the commit, it is not obvious why it’s a problem. But now that git has proven, it has to be buggy I looked at the other fixture data and then it’s obvious and the fix is simple:


--- a/src/api/test/fixtures/package_user_role_relationships.yml
+++ b/src/api/test/fixtures/package_user_role_relationships.yml
@@ -11,8 +11,8 @@ testpack_maintainer:
bs_user_id: 267
role_id: 3
-testpack_maintainer:
- db_package_id: 10095
+testpack1_maintainer:
+ db_package_id: 11006
bs_user_id: 42
role_id: 3

Thanks git 🙂

Both comments and pings are currently closed.

Comments are closed.