Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Perhaps you could commit the unit test in a separate commit, then `git cherry-pick` it as a part of the script?


Will 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.


No: 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^".


You 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: