I generally sign my commits with gpg keys. However, there are certain times that I need to send my patches through email, which I achieve by using git-format-patch
and git-send-email
. However, this results in my GPG signatures removed from the patch. My goal is to have someone else actually apply the patches to repository and send it, also preserving my signature so authenticity of the code is ensured.
By using git-am
, the committer is creating a new hash, thus new commit So I'm not certain that the signature would even work I'm not sure what goes into gpg for signing, only the diff, maybe? If that's the case, I guess this would work. Is this possible?
I've looked at git documentation on git-format-patch
and It seems there's a --signature
option, which is not very well documented, I've tried doing a couple of things to attach a signature to patches, but none of them survived into the destination git repository. What's the correct way of using it?
And finally, even if adding --signature
achieves what I'm trying achieve, it might be cumbersome when creating a series of patches and sending them via email. Is there a batch option that simply attaches the signature which I can clearly see attached to commits with git cat-file -p <HASH>
, to the patches generated with git-format-patch
?
Thanks
I don't think git-format-patch
can preserve signatures. You may try git bundle
; it certainly preserves everything; but it's not as convenient to send over email.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With