So you end up committing untested code? (since you did test the whole change, not just part of it).
Sounds like a bad idea to me.
Sounds like a bad idea to me.
What's the difference? When you're done staging your patch, you can then check out the staging area and run unit tests on it prior to promoting it to a commit. Doesn't compile? Tests fail? Restage as necessary.
git add -p
git commit
git stash
<run tests>
If it fails then I can stash pop and commit -p --amend and try again.https://github.com/garybernhardt/dotfiles/blob/master/bin/ru...
Problem solved.
When I first learned git, I was told, 'You'll never have to comment out code again'. Keeping the barrier for commits low (along with git -p and git rebase -i) makes this a reality.
I really don't care a whit about your feature branch when your broken commits mean I can't bisect an issue.