Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
MatmaRex
· 12y ago · 0 comments
Perhaps you could commit the unit test in a separate commit, then `git cherry-pick` it as a part of the script?
Comments
[–]
Arnavion
12y ago
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.
[–]
kazinator
12y ago
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^".
[–]
CUViper
12y ago
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.