Skip to content

Find the first broken commit without having to learn git bisect

Notifications You must be signed in to change notification settings

grosser/git-autobisect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

  • automagically bundles if necessary
  • stops at first bad commit
  • takes binary steps (HEAD1, HEAD2, HEAD4, HEAD8)

Install

gem install 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 muliplying by 2

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

About

Find the first broken commit without having to learn git bisect

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages