Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Find the first broken commit without having to learn git bisect
Ruby
branch: master
Failed to load latest commit information.
bin libify and add proper version bumping
lib/git add --step option
spec fix build
.travis.yml fix build
Gemfile update lock
Gemfile.lock update lock
Rakefile add bump
Readme.md advertise standalone binary
git-autobisect.gemspec update gemspec

Readme.md

Find the first broken commit without having to learn git bisect.

  • automagically bundles if necessary
  • stops at first bad commit
  • takes binary steps (HEAD~1, HEAD~2, HEAD~4, HEAD~8)

Install

gem install git-autobisect

or as standalone binary (needs any ruby)

curl https://rubinjam.herokuapp.com/pack/git-autobisect > git-autobisect && chmod +x git-autobisect

Usage

cd your project
# run a test that has a non-0 exit status
git-autobisect 'rspec spec/models/user_spec.rb'
... grab a coffee ...
---> The first bad commit is a4328fa
git show

Options

-m, --max N                    Inspect commits between HEAD..HEAD~<max>
-s, --start N                  Use N (instead of 1) as initial step and keep multiplying by 2
--step N                       Use N as step (instead of multiplying by 2
--no-bundle                    Do not bundle even if a Gemfile exists

TIPS

  • do not fail if test file is missing [ ! -f spec/my_spec.rb ] || rspec spec/my_spec.rb

TODO

  • option for max-step-size so you can use a finer grained approach
  • option to disable bundle check || bundle injection
  • option to consider a build failed if it finishes faster then x seconds

Development

  • bundle && bundle exec rake
  • Tests run a lot faster without bundle exec

Author

Michael Grosser
michael@grosser.it
License: MIT
Build Status

Something went wrong with that request. Please try again.