Skip to contentSkip to conversation

Sending patches via gmail

DISCUSSION Jonathan del Strother 3 participants 4 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

I can't seem to send patches via gmail without it adding spurious line breaks - eg http://article.gmane.org/gmane.comp.version-control.git/78407.
I thought this was supposed to be possible... All I'm doing is
copying the contents of my patch, then in Gmail, clicking Compose Mail, make sure it's in Plain Text rather than Rich Formatting mode, paste my patch, and moving the mail header lines out of the message body.

What am I missing?
Jonathan del Strother

#1 lore raw
Quoted 10 lines · Jonathan del Strother

I can't seem to send patches via gmail without it adding spurious line
breaks - eg http://article.gmane.org/gmane.comp.version-control.git/78407.
I thought this was supposed to be possible... All I'm doing is
copying the contents of my patch, then in Gmail, clicking Compose Mail, make sure it's in Plain Text rather than Rich Formatting mode, paste my patch, and moving the mail header lines out of the message body.

What am I missing?
Jonathan del Strother

Try git send-email w/ msmtp:
http://git.or.cz/gitwiki/GitTips#head-a015948617d9becbdc9836776f96ad244ba87cb8

Signature · 1 line
    David
#2 lore raw
Quoted 11 lines · David Aguilar
Quoted 8 lines · Jonathan del Strother

I can't seem to send patches via gmail without it adding spurious line
breaks - eg http://article.gmane.org/gmane.comp.version-control.git/78407.
I thought this was supposed to be possible... All I'm doing is
copying the contents of my patch, then in Gmail, clicking Compose Mail, make sure it's in Plain Text rather than Rich Formatting mode, paste my patch, and moving the mail header lines out of the message body.

Quoted 8 lines
Quoted 2 lines

What am I missing?
Jonathan del Strother

Try git send-email w/ msmtp:
http://git.or.cz/gitwiki/GitTips#head-a015948617d9becbdc9836776f96ad244ba87cb8

...which seems to work ok, except for the fact that the From line in my patch (the output of git format-patch) then appears at the top of my message body in the resulting email (from git send-email). Deleting the From line from the patch seems to make everything work as expected. Any ideas what's going on there?

#3 lore raw
Quoted 5 lines · Jonathan del Strother

...which seems to work ok, except for the fact that the From line in my patch (the output of git format-patch) then appears at the top of my message body in the resulting email (from git send-email). Deleting the From line from the patch seems to make everything work as expected. Any ideas what's going on there?

send-email will create a "from" line in the body of the message if the "sender" (using --from, or answering "Who should the emails appear to be from") doesn't match the patch's author (the "From:" line in the generated patch, which comes from the author field of the commit). The line is interpeted by git-am to properly credit the original author.

It looks like you are committing as [email protected], but sending the emails as [email protected].

-Peff