# gmail screws up patches looking for workable workaround

7 messages from 2009-02-13 to 2009-02-14. Participants: Caleb Cushing, Jacob Helwig, Sitaram Chamarty.
Thread: https://gitlist.dev/t/17775

## Caleb Cushing, 2009-02-13 17:09

Subject: gmail screws up patches looking for workable workaround
Message-ID: <81bfc67a0902130909i154a7c2epeff98347985c3fb8@mail.gmail.com>
URL: https://gitlist.dev/e/81bfc67a0902130909i154a7c2epeff98347985c3fb8%40mail.gmail.com

```
I've followed all the steps in the git Submitting patches guide. In
fact it works fine for any patch where all lines are less than 80?
chars. however, some of the patches store sha256 hashes (and the like)
and have really long lines and gmail word wraps them.

I've tried submitting patches as follows.

git format-patch -1 -M --stdout | git imap-send

git format-patch -1 -M --stdout --attach | git imap-send

git format-patch -1 -M --stdout --inline | git imap-send


we know the first corrupts the patches. but what I can't figure out is
why the next 2 don't work on the receiving end. The comment was.


git am -3 -i, when I choose [v]iew patch, I get a binary output.


I'm trying to figure out how I can submit patches via gmail for
someone that uses git am. what is being done wrong?

-- 
Caleb Cushing

http://xenoterracide.blogspot.com

```

## Jacob Helwig, 2009-02-13 17:26

Subject: Re: gmail screws up patches looking for workable workaround
Message-ID: <8c9a060902130926j48b59785l624a3966254517e5@mail.gmail.com>
URL: https://gitlist.dev/e/8c9a060902130926j48b59785l624a3966254517e5%40mail.gmail.com
In-Reply-To: <81bfc67a0902130909i154a7c2epeff98347985c3fb8@mail.gmail.com>

```
On Fri, Feb 13, 2009 at 09:09, Caleb Cushing <xenoterracide@gmail.com> wrote:
> I've followed all the steps in the git Submitting patches guide. In
> fact it works fine for any patch where all lines are less than 80?
> chars. however, some of the patches store sha256 hashes (and the like)
> and have really long lines and gmail word wraps them.
>
> I've tried submitting patches as follows.
>
> git format-patch -1 -M --stdout | git imap-send
>
> git format-patch -1 -M --stdout --attach | git imap-send
>
> git format-patch -1 -M --stdout --inline | git imap-send
>
>
> we know the first corrupts the patches. but what I can't figure out is
> why the next 2 don't work on the receiving end. The comment was.
>
>
> git am -3 -i, when I choose [v]iew patch, I get a binary output.
>
>
> I'm trying to figure out how I can submit patches via gmail for
> someone that uses git am. what is being done wrong?
>
> --
> Caleb Cushing
>
> http://xenoterracide.blogspot.com
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

This is the setup I use for emailing patches using git:

~/.gitconfig
[sendemail]
    smtpserver = smtp.gmail.com
    smtpserverport = 587
    smtpuser = your.email@gmail.com
    smtppass = yourPassword
    smtpencryption = tls

$ git format-patch <options>
# add comments to 00*.patch files.
$ git send-email 00*

I've never seen any mangling using send-email, and the gmail SMTP
server.  I've never actually tried using imap-send.  Not quite the
answer to your question, but hopefully, it's another option.

```

## Caleb Cushing, 2009-02-13 18:00

Subject: Re: gmail screws up patches looking for workable workaround
Message-ID: <81bfc67a0902131000n2d67e88epd743c7c39842fbc@mail.gmail.com>
URL: https://gitlist.dev/e/81bfc67a0902131000n2d67e88epd743c7c39842fbc%40mail.gmail.com
In-Reply-To: <8c9a060902130926j48b59785l624a3966254517e5@mail.gmail.com>

```
> ~/.gitconfig
> [sendemail]
>    smtpserver = smtp.gmail.com
>    smtpserverport = 587
>    smtpuser = your.email@gmail.com
>    smtppass = yourPassword
>    smtpencryption = tls
>
> $ git format-patch <options>
> # add comments to 00*.patch files.
> $ git send-email 00*
> I've never seen any mangling using send-email, and the gmail SMTP
> server.  I've never actually tried using imap-send.  Not quite the
> answer to your question, but hopefully, it's another option.
>

[sendmail]
    smtpserver = smtp.gmail.com
    smtpserverport = 587
    smtpuser = xenoterracide@gmail.com
    smtppass = YeahITypedThisRight
    smtpencryption = tls

everything look good here? because mail isn't actually reaching it's
destination. I have a feeling that's because the MTA isn't set up. I
/could/ set that up... but I don't think that's something that anyone
should have to do to send email patches.

also according to someone else the reason git can't handle the
attachments is because they are still base64 encoded.
-- 
Caleb Cushing

http://xenoterracide.blogspot.com

```

## Jacob Helwig, 2009-02-13 18:11

Subject: Re: gmail screws up patches looking for workable workaround
Message-ID: <8c9a060902131011u5bc7d0dft4edc4adb1af1dad8@mail.gmail.com>
URL: https://gitlist.dev/e/8c9a060902131011u5bc7d0dft4edc4adb1af1dad8%40mail.gmail.com
In-Reply-To: <81bfc67a0902131000n2d67e88epd743c7c39842fbc@mail.gmail.com>

```
On Fri, Feb 13, 2009 at 10:00, Caleb Cushing <xenoterracide@gmail.com> wrote:
>> ~/.gitconfig
>> [sendemail]
>>    smtpserver = smtp.gmail.com
>>    smtpserverport = 587
>>    smtpuser = your.email@gmail.com
>>    smtppass = yourPassword
>>    smtpencryption = tls
>>
>> $ git format-patch <options>
>> # add comments to 00*.patch files.
>> $ git send-email 00*
>> I've never seen any mangling using send-email, and the gmail SMTP
>> server.  I've never actually tried using imap-send.  Not quite the
>> answer to your question, but hopefully, it's another option.
>>
>
> [sendmail]
>    smtpserver = smtp.gmail.com
>    smtpserverport = 587
>    smtpuser = xenoterracide@gmail.com
>    smtppass = YeahITypedThisRight
>    smtpencryption = tls
>
> everything look good here? because mail isn't actually reaching it's
> destination. I have a feeling that's because the MTA isn't set up. I
> /could/ set that up... but I don't think that's something that anyone
> should have to do to send email patches.
>
> also according to someone else the reason git can't handle the
> attachments is because they are still base64 encoded.
> --
> Caleb Cushing
>
> http://xenoterracide.blogspot.com
>

"git imap-send" doesn't use the [sendmail] section of the .gitconfig.
It uses the [imap] section.  The [sendmail] configuration is if you're
using "git send-email".

If you setup the smtp* options, you don't need a local MTA, since
send-email will use the SMTP server you configured.

Are you still getting the corruption if you let format-patch generate
the patch on disk (don't use the --stdout option), and give the patch
filename(s) as the final arguments to send-email?  (Could you show the
new sequence of commands you're using, and what the output is?)

```

## Caleb Cushing, 2009-02-13 18:20

Subject: Re: gmail screws up patches looking for workable workaround
Message-ID: <81bfc67a0902131020w66e114b7ke642ab8308e530c3@mail.gmail.com>
URL: https://gitlist.dev/e/81bfc67a0902131020w66e114b7ke642ab8308e530c3%40mail.gmail.com
In-Reply-To: <8c9a060902131011u5bc7d0dft4edc4adb1af1dad8@mail.gmail.com>

```
> "git imap-send" doesn't use the [sendmail] section of the .gitconfig.
> It uses the [imap] section.  The [sendmail] configuration is if you're
> using "git send-email".

yeah... I've both set up, and followed your sendmail instructions explicitly

> If you setup the smtp* options, you don't need a local MTA, since
> send-email will use the SMTP server you configured.

tell that to the postdrop (postfix) error that I saw on the screen.

> Are you still getting the corruption if you let format-patch generate
> the patch on disk (don't use the --stdout option), and give the patch
> filename(s) as the final arguments to send-email?  (Could you show the
> new sequence of commands you're using, and what the output is?)
>

no... no corruption locally. the problem is the mail never arrives. I
don't know where it disappears at, but it doesn't make it to the inbox
I send it to, and I really, really, really do not want to troubleshoot
any of the 1000 places it could have gone wrong

 git send-email 00*
0001-remove-mysql-community-5.1-beta.patch
Who should the emails appear to be from? [Caleb Cushing
<xenoterracide@gmail.com>]
Emails will be sent from: Caleb Cushing <xenoterracide@gmail.com>
Who should the emails be sent to? xenoterracide@gmail.com
Message-ID to be used as In-Reply-To for the first email?
xenoterracide@gmail.com
(mbox) Adding cc: Caleb Cushing <xenoterracide@gmail.com> from line
'From: Caleb Cushing <xenoterracide@gmail.com>'
(sob) Adding cc: Caleb Cushing <xenoterracide@gmail.com> from line
'Signed-off-by: Caleb Cushing <xenoterracide@gmail.com>'
postdrop: warning: unable to look up public/pickup: No such file or directory
OK. Log says:
Sendmail: /usr/sbin/sendmail -i xenoterracide@gmail.com
From: Caleb Cushing <xenoterracide@gmail.com>
To: xenoterracide@gmail.com
Subject: [PATCH] remove mysql-community-5.1*beta
Date: Fri, 13 Feb 2009 13:19:14 -0500
Message-Id: <1234549154-24500-1-git-send-email-xenoterracide@gmail.com>
X-Mailer: git-send-email 1.6.1.3
In-Reply-To: <xenoterracide@gmail.com>
References: <xenoterracide@gmail.com>

Result: OK

and yet no email ever arrives at my inbox. (or spam for that matter)
-- 
Caleb Cushing

http://xenoterracide.blogspot.com

```

## Jacob Helwig, 2009-02-13 19:35

Subject: Re: gmail screws up patches looking for workable workaround
Message-ID: <8c9a060902131135m2b8e89d3s25d3b4455dae0f32@mail.gmail.com>
URL: https://gitlist.dev/e/8c9a060902131135m2b8e89d3s25d3b4455dae0f32%40mail.gmail.com
In-Reply-To: <81bfc67a0902131020w66e114b7ke642ab8308e530c3@mail.gmail.com>

```
On Fri, Feb 13, 2009 at 10:20, Caleb Cushing <xenoterracide@gmail.com> wrote:
>> "git imap-send" doesn't use the [sendmail] section of the .gitconfig.
>> It uses the [imap] section.  The [sendmail] configuration is if you're
>> using "git send-email".
>
> yeah... I've both set up, and followed your sendmail instructions explicitly
>
>> If you setup the smtp* options, you don't need a local MTA, since
>> send-email will use the SMTP server you configured.
>
> tell that to the postdrop (postfix) error that I saw on the screen.
>
>> Are you still getting the corruption if you let format-patch generate
>> the patch on disk (don't use the --stdout option), and give the patch
>> filename(s) as the final arguments to send-email?  (Could you show the
>> new sequence of commands you're using, and what the output is?)
>>
>
> no... no corruption locally. the problem is the mail never arrives. I
> don't know where it disappears at, but it doesn't make it to the inbox
> I send it to, and I really, really, really do not want to troubleshoot
> any of the 1000 places it could have gone wrong
>
>  git send-email 00*
> 0001-remove-mysql-community-5.1-beta.patch
> Who should the emails appear to be from? [Caleb Cushing
> <xenoterracide@gmail.com>]
> Emails will be sent from: Caleb Cushing <xenoterracide@gmail.com>
> Who should the emails be sent to? xenoterracide@gmail.com
> Message-ID to be used as In-Reply-To for the first email?
> xenoterracide@gmail.com
> (mbox) Adding cc: Caleb Cushing <xenoterracide@gmail.com> from line
> 'From: Caleb Cushing <xenoterracide@gmail.com>'
> (sob) Adding cc: Caleb Cushing <xenoterracide@gmail.com> from line
> 'Signed-off-by: Caleb Cushing <xenoterracide@gmail.com>'
> postdrop: warning: unable to look up public/pickup: No such file or directory
> OK. Log says:
> Sendmail: /usr/sbin/sendmail -i xenoterracide@gmail.com

I should have looked more closely, when you posted your config.  You
have "[sendmail]", instead of "[sendemail]".  You're missing the "e"
on "email".  What made me re-look is the line right after "OK. Log
says:".

You should have seen:
OK. Log says:
Server: smtp.gmail.com

Not:
OK. Log says:
Sendmail: /usr/sbin/sendmail -i xenoterracide@gmail.com

```

## Sitaram Chamarty, 2009-02-14 00:46

Subject: Re: gmail screws up patches looking for workable workaround
Message-ID: <slrngpc53h.jdo.sitaramc@sitaramc.homelinux.net>
URL: https://gitlist.dev/e/slrngpc53h.jdo.sitaramc%40sitaramc.homelinux.net
In-Reply-To: <81bfc67a0902131000n2d67e88epd743c7c39842fbc@mail.gmail.com>

```
On 2009-02-13, Caleb Cushing <xenoterracide@gmail.com> wrote:
>> ~/.gitconfig
>> [sendemail]

> [sendmail]

> everything look good here? because mail isn't actually reaching it's

no :-) you're missing an 'e'.  Not sure if that makes a
difference

```
