public inbox for [email protected]  
help / color / mirror / Atom feed
From: Chris Mayo <[email protected]>
To: Dave Page <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: [PATCH] Document that a patch should be submitted to the list as an attachment
Date: Wed, 12 Oct 2016 12:33:52 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+OCxowpkLjJ9o8mdPVUhh=0v3gR_k=gPjr0UX1VtqepJ1kSMQ@mail.gmail.com>
References: <[email protected]>
	<CA+OCxozwteHaoa9ge5n2WXu9SgF71cn8Z118a5E2JEaNP0yBTw@mail.gmail.com>
	<[email protected]>
	<CA+OCxowpkLjJ9o8mdPVUhh=0v3gR_k=gPjr0UX1VtqepJ1kSMQ@mail.gmail.com>
List-Unsubscribe:  <mailto:[email protected]?body=unsub%20pgadmin-hackers>

>     > /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.

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?
 - Save from the web archive

> 
> 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...

Chris



-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers



view thread (6+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: [PATCH] Document that a patch should be submitted to the list as an attachment
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox