Sounds like a bad idea to me.
Git add -p: a powerful git feature
21–30 of 108 posts
Re: Git add -p: a powerful git feature
#22So 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.
Problem solved.
Re: Git add -p: a powerful git feature
#23So 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.
Re: Git add -p: a powerful git feature
#24OT: I'd love an interactive "Learn Git" webpage where you could learn to use Git with demo scenarios. Something like "Try Ruby" but for git.
Peepcode screencasts are worth every penny.
Re: Git add -p: a powerful git feature
#25I don't ever use git -p directly, but I use magit ( https://github.com/magit/magit ) for emacs, which makes staging changes this way very easy.
It makes crafting commits a joy.
Re: Git add -p: a powerful git feature
#26So 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.
That is most definitely a major issue of this technique, though it can probably be mitigated through various hooks.
Re: Git add -p: a powerful git feature
#27So 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.
Re: Git add -p: a powerful git feature
#28So 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.
git stash -k; make test; git stash pop, git commit; Problem solved.
Re: Git add -p: a powerful git feature
#29Re: Git add -p: a powerful git feature
#30Earlier quoted context omitted.
git stash -k; make test; git stash pop, git commit; Problem solved.
The problem is with the process, people will forget. You probably need to automate this.