Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1buKAv-0006JA-27 for pgadmin-hackers@arkaria.postgresql.org; Wed, 12 Oct 2016 14:06:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1buKAu-0005jW-3n for pgadmin-hackers@arkaria.postgresql.org; Wed, 12 Oct 2016 14:06:28 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1buKAt-0005jO-CB for pgadmin-hackers@postgresql.org; Wed, 12 Oct 2016 14:06:27 +0000 Received: from mail-io0-x22e.google.com ([2607:f8b0:4001:c06::22e]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1buKAo-0000ee-0x for pgadmin-hackers@postgresql.org; Wed, 12 Oct 2016 14:06:25 +0000 Received: by mail-io0-x22e.google.com with SMTP id i202so51238736ioi.2 for ; Wed, 12 Oct 2016 07:06:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=rEbqphnpEcOjWRyHM7sb2obm1tFunazbFdKtUBtDtPM=; b=eRKrQXPv5Un8uQhoMeBeHcxpTkXjxKGvnlHrPZoUlJJ7dzTlShxRiOPdHTntiVat6h 7whzIWKyobS0cgxMRPYUVTcYpQS0YEri2RUmAjwM/yJwj9iAboZLjYztjd1JFgNGGaVm S00zoq/baKNLi/7OgB3YvDVvCRokn6HTnAqe2jgs8pX02PYxDwHYRqCM0Mu0/G2SCYRZ hQqGyNgvrgxO5kxOgUVhvcH7CKoS5PrqwIBuNWJhbRSON8y0tQuBQYrJF8GyMR94L4gr ysd6mIgErPjBQ+sAEkL5Bi20TOpkUQuqwNvY1s9pRXQpawUZES0rquaEor2jkAIW3qST NsGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=rEbqphnpEcOjWRyHM7sb2obm1tFunazbFdKtUBtDtPM=; b=AnSPALBmAvQRQJUmGSlUQ5uf2z79o4ySzxQkjhwM26WwL2iI1XhjNfZneY3LkIBlam 0//GSwalrfvdXWkJwsg1oM2PS0Fczy2sU4j7pIGk9UnwGwBv5WWEhaKcTdLU0fK9FwDp Ml/EYOeeqbxBC44rkiNIDt5AS8bu3vCQWcxfg3JZ/UAwXgzrEXysaaNKKpP8RoQwa+YK HDdUoIF2ag+3FMQU7i9eiZHpzFj72g9Si6I0uNg3WX6SkmU+iaWlZQA5h5+BOYHT9XWF IAqeQYW6QW3WnXxenDb9NRcdCJgUg5s1aiekdEkjUiInVi7kcVVf+kcmpx4y+lE35hlw g3kw== X-Gm-Message-State: AA6/9RkpKWuxHGq1iwSwVZSf7o407DvWhRB4FEPOjdlx87fUofIf05ADSftMrzZGo2k0BGLlT5w8DLUVPb3B9w== X-Received: by 10.107.11.98 with SMTP id v95mr1633693ioi.145.1476281181017; Wed, 12 Oct 2016 07:06:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.146.135 with HTTP; Wed, 12 Oct 2016 07:06:20 -0700 (PDT) In-Reply-To: <62ec210e-45d0-b759-41d2-dfbd390d9012@gmail.com> References: <1476124842-31390-1-git-send-email-aklhfex@gmail.com> <62ec210e-45d0-b759-41d2-dfbd390d9012@gmail.com> From: Dave Page Date: Wed, 12 Oct 2016 15:06:20 +0100 Message-ID: Subject: Re: [PATCH] Document that a patch should be submitted to the list as an attachment To: Chris Mayo Cc: "pgadmin-hackers@postgresql.org" Content-Type: multipart/alternative; boundary=001a113f9110624523053eab7fc3 X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org --001a113f9110624523053eab7fc3 Content-Type: text/plain; charset=UTF-8 Hi On Wednesday, October 12, 2016, Chris Mayo wrote: > > > /Users/dpage/Downloads/0001-Document-that-a-patch-should- > be-submitted-to-the-lis.patch:16: trailing whitespace. > > > as well as the rationale for any important design decisions. > > > error: patch failed: docs/en_US/submitting_patches.rst:30 > > > error: docs/en_US/submitting_patches.rst: patch does not apply > > > > > > > I checked and I can't see anything wrong. I also tried downloading > the patch from the web archive and using git apply. > > > > The "trailing whitespace" errors may suggest the problem - the added > lines in the patch don't have any whitespace. > > Have you been near a Windows machine? I used unix2dos on the patch > and then got the same result as above. > > > > > > No, I've only been on my Mac. Your suggestion made me think though - I > opened the patch in my editor, and it claims the original had Windows line > endings. I converted them to \n and it applied just fine. > > I think it's an email thing. From: > https://github.com/git/git/commit/8d8140843501107c92e2f9a5acb60ee136352c1f > "The problem is that SMTP transport is CRLF-unsafe. Sending a patch by > email is the same as passing it through "dos2unix | unix2dos". The newly > introduced CRLFs are normally transparent because git-am strips them." > > I have been using git send-email, to avoid the risk of a mail client > mangling patches. > But I can try using Thunderbird in future. > > I guess git imap-send behaviour is similar: > http://www.spinics.net/lists/git/msg160136.html > " > > I'm using git imap-send to send patches to wine-patches, and it seems > > like it converts all my patches to have CRLF line endings? > > The canonical line ending for mail is CRLF. So yes, it will convert your > patch to CRLF for storage. But anything pulling it out of the IMAP > folder should convert it back to native line endings." > > > Testing locally the raw emails do have CRLF saved from Thunderbird as .eml, > although when I save just the attachment the patch only has LF. > > Not sure why this hasn't been an issue before on the list. > It has, on rare occasions. One particular friend of mine had to resort to gzipping patches for pgAdmin 4, but it's been a non-issue for pretty much everyone else here - and the process we use is pretty standard on the PostgreSQL lists as well, where it's also not generally a problem. Note that at least for those of us at EDB, Gmail is the standard client we use. I wonder if some combination of sending and receiving MUAs is what causes the problem. > > The Git tools seem to be more focussed on inline messages. On the > receiving end > using attachments the ideas I have: > - Is there a save as text option in your client? > You can view the original message in Gmail, but that's the entire raw text of it, so you get all the mime parts and headers as well. > - Save from the web archive > That's a possibility, though it's such a rare issue that I doubt we'll remember to do it. I'd really like to know the root cause - it's quite annoying not being able to pin it down. > > > > > What does 'git config core.autocrlf' output for you? > > The only core. attribute I have set is core.editor. > > > > > In any case, I applied the patch. Thanks! > > > > Hopefully we don't have to add more instructions as a result of this > discussion... > Well at least it's keeping you busy :-) Thanks, Dave. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company --001a113f9110624523053eab7fc3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi

On Wednesday, October 12, 2016, Chris Mayo <aklhfex@gmail.com> wrote:
>=C2=A0 =C2=A0 =C2=A0> /Users/dpage/Downloads/0001-Do= cument-that-a-patch-should-be-submitted-to-the-lis.patch:16: trai= ling whitespace.
>=C2=A0 =C2=A0 =C2=A0> as well as the rationale for any important des= ign decisions.
>=C2=A0 =C2=A0 =C2=A0> error: patch failed: docs/en_US/submitting_pat= ches.rst:30
>=C2=A0 =C2=A0 =C2=A0> error: docs/en_US/submitting_patches.rst:= patch does not apply
>=C2=A0 =C2=A0 =C2=A0>
>
>=C2=A0 =C2=A0 =C2=A0I checked and I can't see anything wrong. I als= o tried downloading the patch from the web archive and using git apply.
>
>=C2=A0 =C2=A0 =C2=A0The "trailing whitespace" errors may sugg= est the problem - the added lines in the patch don't have any whitespac= e.
>=C2=A0 =C2=A0 =C2=A0Have you been near a Windows machine? I used unix2d= os on the patch and then got the same result as above.
>
>
> No, I've only been on my Mac. Your suggestion made me think though= - I opened the patch in my editor, and it claims the original had Windows = line endings. I converted them to \n and it applied just fine.

I think it's an email thing. From:
https://github.com/git/git/commit/8= d8140843501107c92e2f9a5acb60ee136352c1f
"The problem is that SMTP transport is CRLF-unsafe.=C2=A0 Sending a pa= tch by
email is the same as passing it through "dos2unix | unix2dos".=C2= =A0 The newly
introduced CRLFs are normally transparent because git-am strips them."=

I have been using git send-email, to avoid the risk of a mail client mangli= ng patches.
But I can try using Thunderbird in future.

I guess git imap-send behaviour is similar:
http://www.spinics.net/lists/git/msg160136.html
"
> I'm using git imap-send to send patches to wine-patches, and it se= ems
> like it converts all my patches to have CRLF line endings?

The canonical line ending for mail is CRLF. So yes, it will convert your patch to CRLF for storage. But anything pulling it out of the IMAP
folder should convert it back to native line endings."


Testing locally the raw emails do have CRLF saved from Thunderbird as .eml,=
although when I save just the attachment the patch only has LF.

Not sure why this hasn't been an issue before on the list.

It has, on rare occasions. One particular friend of= mine had to resort to gzipping patches for pgAdmin 4, but it's been a = non-issue for pretty much everyone else here - and the process we use is pr= etty standard on the PostgreSQL lists as well, where it's also not gene= rally a problem.

Note that at least for those of u= s at EDB, Gmail is the standard client we use. I wonder if some combination= of sending and receiving MUAs is what causes the problem.=C2=A0
= =C2=A0

The Git tools seem to be more focussed on inline messages. On the receiving= end
using attachments the ideas I have:
=C2=A0- Is there a save as text option in your client?

You can view the original message in Gmail, but that's = the entire raw text of it, so you get all the mime parts and headers as wel= l.
=C2=A0
=C2=A0- Save from the web archive

That&= #39;s a possibility, though it's such a rare issue that I doubt we'= ll remember to do it.

I'd really like to know = the root cause - it's quite annoying not being able to pin it down.
=C2=A0

>
> What does 'git config core.autocrlf' output for you?

The only core. attribute I have set is core.editor.

>
> In any case, I applied the patch. Thanks!
>

Hopefully we don't have to add more instructions as a result of this di= scussion...

Well at least it's keep= ing you busy :-)

Thanks, Dave.=C2=A0


= --
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

Enterp= riseDB UK: http:/= /www.enterprisedb.com
The Enterprise PostgreSQL Company

--001a113f9110624523053eab7fc3--