Nice! A couple of thoughts re. your "It's not perfect" which wouldn't add real extra complexity:<p>Using --from with git-format-patch will add the From: header to the commit message body in the standard way when emailing a patch written by someone else, which would allow you to preserve this easily without risking excitement from injection attacks into email headers.<p>Maybe the right behaviour for all-zero $oldsha is to quietly turn format-patch $oldsha..$newsha into format-patch --root $newsha?
<p><pre><code> echo 'The push will now exit with an error. No commits have actually been pushed.'
</code></pre>
Is this part so that the temporary git objects are cleaned up? Or is there some other reason that it has to exit with error?