Recently I had the joy of using git bisect to find a bug that I had introduced in a repository. Honestly, the beauty of it almost makes me want to make more mistakes when coding. I first tell git that some thing is broken and that it used to work:
git bisect start git bisect bad git bisect good <some revision from yesterday>
After this, git will then start walking me through the history to determine where the code went wrong. I tell git whether the current commit is good (git bisect good) or bad (git bisect bad). Some of the commits are untestable (due to a failure to compile with commits that dealt with an API change being propagated through the code base) which I tell git to skip (git bisect skip).
Unfortunately the code base was not as uniform as I usually like it to be so I missed an opportunity to have git do everything for me. Build failures destroy this since they have to be skipped and are neither good nor bad (though reading the documentation, using 125 as the exit code has git skip that revision). With a script that tested each revision, git could have done the testing for me (git bisect run ./my_script arg1 arg2).
I'm glad git bisect exists. Anyone else ever used it?