Git theme of send-message does not change, despite the -subject option

I am trying to set the theme for the patch, which I send manually, but for some reason he always chooses the theme for fixing the patch instead of the one I put to him.

I run it like

git send-email --compose --subject="blah" file.patch 

and even if I see the "blah" theme in the editor window that opens, after I save it and try to email the patch, the theme sent by mail still matches the fix fix message.

What am I doing wrong?

+6
source share
1 answer

You are not doing anything wrong: --compose tells git send-email that you want to write a "cover letter" with the subject that you gave with --subject . The actual commit will be sent in response to this β€œcover letter,” with the first line of the commit message being the subject.

This is the "standard format", which is understood as git am , so that the recipient can apply the patch and get the same result. This means that changing the subject of the patch message will change the commit message : your recipient will receive another commit, which is probably not what you want.

If you really want to send the commit via email using a custom object, you can prepare your patch using git format-patch and then attach it to an email written in your regular MUA. So the receiver can git am insert.

+6
source

Source: https://habr.com/ru/post/900676/


All Articles