4 ms·
Perhaps you could commit the unit test in a separate commit, then `git cherry-pick` it as a part of the script?
by MatmaRex 12y ago
Perhaps you could commit the unit test in a separate commit, then `git cherry-pick` it as a part of the script?
- Arnavion 12y agoWill bisect not get confused if you change the commit range it's testing as part of running it? Also cherry-picking might still generate conflicts.
- kazinator 12y agoNo: you would cherry pick the change needed to bring in the test code, run the test and decide whether it is "good" or "bad". Then before running "git bisect good/bad" you would eliminate the cherry-picked change with "git reset --hard HEAD^".
- CUViper 12y agoYou can also "git cherry-pick -n" to only apply it to the working directory, with no commit, and then "git checkout -f" is an easy cleanup.