git bisect doesn't work, no output -
i tried use git bisect
lately, didn't work. tree remained in master , saw no output git bisect
whatsoever. here's i've tried:
git bisect start git bisect bad # no output, tried couple of times git bisect # no output git bisect reset #-> on 'master'
i tried on 2 different repos. didn't work. git --version 1.6.3.3 on ubuntu 9.10 ideas?
introduction git bisect
"git bisect" can little confusing @ first. once understand does, it'll easy.
the typical scenerio "git bisect" is: bug discovered. want find out rev introduced bug. know bug exists in latest rev, introduced in prior rev. need way find out whether or not bug exists. can automatic test, or can test run hand.
let's started. starting latest rev in branch, issue:
git bisect start
and tell git current version known bad:
git bisect bad
now need find rev. check 1 old enough not have bug. if think 32 revs ago ought good, then:
git checkout head~32
and run test see if has bug. if has bug, you'll need try older rev (just issue "git checkout head~32" again). land on rev not have bug, then:
git bisect
that tells git current version good. git check out rev in-between rev , bad rev; you'll see output, example:
$ git bisect bisecting: 7 revisions left test after (roughly 3 steps) [909ba8cd7698720d00b2d10738f6d970a8955be4] added convenience delegators cache
run test, , depending upon results of test, issue 1 of these commands:
git bisect # test passed
git bisect bad # test failed
git bisect skip # can't run test on rev reason (doesn't compile, etc.)
git continue change different revs, , you'll keep telling good, bad or skip. when git figures out rev started trouble, you'll this:
b25ab3cee963f4738264c9c9b5a8d1a344a94623 first bad commit commit b25ab3cee963f4738264c9c9b5a8d1a344a94623 author: wayne conrad <wconrad@yagni.com> date: fri dec 25 18:20:54 2009 -0700 more tests , refactoring :040000 040000 6ff7502d5828598af55c7517fd9626ba019b16aa 39f346cb5a289cdb0955fcbba552f40e704b7e65 m routecalc
and current rev there, on first bad commit.
running git bisect "hands off"
if test automatic, can let git work. did started above:
git bisect start git bisect bad git checkout head~32 # or far takes find rev git bisect
and magic. need test program returns exit code "0" success , 1 (for example) failure. tell git test:
git bisect run tests/mytest.rb
git run test, using results automatically "git bisect good" or "git bisect bad." continue doing until commit introduced bug found. have sit , watch.
when you're done
when you're done, issue:
git bisect reset
git put started.
Comments
Post a Comment