"Keeping a project bisectable". This is the first I've heard of this "git bisect" command and it sounds intriguing. Has anyone out there used it?

"A 'bisectable' project is a project where one can reliably run git bisect, which is a very useful command to find a commit that introduces a bug. It works doing a binary search in the git history until finding the guilty commit. This process involves building each step of the bisect and running a test on each build to check if it's good or bad (that you can magically automate with git bisect run). The problem is, if you can't compile, you can't tell if this commit is before or after the bug (it can even be the culpable commit itself!). Then you need to jump and try another commit and hope that it will compile, making the process more painful. A lot of build breakages along the commit history can easily discourage a brave bisecter."

This made it sound like "git bisect" runs your tests, but upon reading the documentation I see in fact normally it is a series of subcommands that step you through the process and you run your tests and tell it good or bad/old or new. It does allow you to write a program that it can execute as a command line to automate the whole process, though.

Keeping a project bisectable - tony is coding

#computerscience #tdd #git

There are no comments yet.