threads / discuss / 17775

gmail screws up patches looking for workable workaround

Subject: gmail screws up patches looking for workable workaround

## tl;dr

7 messages between Feb 13, 2009 and Feb 14, 2009.

replies: 6people: 3as markdown or json

Caleb Cushing· Feb 13, 2009, 17:09 UTC · lore

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· Feb 13, 2009, 17:26 UTC · re: Caleb Cushing · lore

Re: gmail screws up patches looking for workable workaround

On Fri, Feb 13, 2009 at 09:09, Caleb Cushing <xenoterracide@gmail.com> wrote:
Show 33 quoted lines
> 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· Feb 13, 2009, 18:00 UTC · re: Jacob Helwig · lore

Re: gmail screws up patches looking for workable workaround

Show 15 quoted lines
> ~/.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· Feb 13, 2009, 18:11 UTC · re: Caleb Cushing · lore

Re: gmail screws up patches looking for workable workaround

On Fri, Feb 13, 2009 at 10:00, Caleb Cushing <xenoterracide@gmail.com> wrote:
Show 35 quoted lines
>> ~/.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· Feb 13, 2009, 18:20 UTC · re: Jacob Helwig · lore

Re: gmail screws up patches looking for workable workaround

> "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.
Show 5 quoted lines
> 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· Feb 13, 2009, 19:35 UTC · re: Caleb Cushing · lore

Re: gmail screws up patches looking for workable workaround

On Fri, Feb 13, 2009 at 10:20, Caleb Cushing <xenoterracide@gmail.com> wrote:
Show 37 quoted lines
>> "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· Feb 14, 2009, 00:46 UTC · re: Caleb Cushing · lore

Re: gmail screws up patches looking for workable workaround

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

← back to recent threads