
On 07/10/2013 09:11 PM, Laine Stump wrote:
I had made the change locally, so make check and make syntax-check were successful, but forgot to add/commit. Unfortunately, git allows a push when the local directory is dirty, so it didn't catch my mistake.
I also got bit by a similar situation yesterday, on another list - but with send-email instead of push.
--- Pushed under the build breaker rule.
git *was* very informative when I tried to switch branches - *then* it complained about the uncommitted local changes. No problem to push with outstanding local changes though. That seems like a bug to me; is there any situation where that would be a desired thing?
Yes, it can be reasonable to push a patch while the tree is still dirty for unrelated reasons. But I agree that it seems like an advanced option, and that most users would much rather be informed any time 'send-email' or 'push' is attempted while changes are still pending, especially if the changes being emailed or pushed touch the same files. There's probably a way to set up git hooks to forbid push actions if the tree is dirty, but that would be a question for the git lists or irc channel. If either one of us finds a solution for such a hook, be sure to post it back here. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org