Re: [PATCH for-maint] apply: gitdiff_verify_name(): accept /dev/null\r

2014-09-24 Thread Laszlo Ersek
On 09/23/14 23:35, Junio C Hamano wrote: Laszlo Ersek ler...@redhat.com writes: [...] The important thing to note here is that use of text/plain for patches, if you want to have distinction between CRLF and LF in your payload, is not designed to work over e-mails. That's good to know,

Re: [PATCH for-maint] apply: gitdiff_verify_name(): accept /dev/null\r

2014-09-24 Thread Junio C Hamano
Laszlo Ersek ler...@redhat.com writes: Thank you for taking the time to describe this. It does look like the by-the-book solution. Obviously, I can't implement it myself -- first, I have no experience with the git codebase, ... Oh, I wasn't expecting that anyway ;-). The reason I outlined

Re: [PATCH for-maint] apply: gitdiff_verify_name(): accept /dev/null\r

2014-09-23 Thread Junio C Hamano
Laszlo Ersek ler...@redhat.com writes: git format-patch master..branch1 The output from this has these (excerpt from od -xc output): 360 f 2 \n \n d i f f - - g i t 66200a32640a666920662d2d69672074 400 a / f

Re: [PATCH for-maint] apply: gitdiff_verify_name(): accept /dev/null\r

2014-09-23 Thread Laszlo Ersek
On 09/23/14 20:54, Junio C Hamano wrote: Laszlo Ersek ler...@redhat.com writes: git format-patch master..branch1 The output from this has these (excerpt from od -xc output): 360 f 2 \n \n d i f f - - g i t 66200a32640a6669

Re: [PATCH for-maint] apply: gitdiff_verify_name(): accept /dev/null\r

2014-09-23 Thread Junio C Hamano
Laszlo Ersek ler...@redhat.com writes: What do you think about accepting only /dev/null\n and /dev/null\r\n? I thought we agreed that what you are doing is not workable in the first place, no? I suspect one way to handle In this project, the files that are checked out must be with CRLF line

Re: [PATCH for-maint] apply: gitdiff_verify_name(): accept /dev/null\r

2014-09-23 Thread Junio C Hamano
Laszlo Ersek ler...@redhat.com writes: On 09/23/14 20:54, Junio C Hamano wrote: ... SMTP transport may be CRLF-unsafe, so I have a suspicion that it may turn out that what you are trying to do might be an equilvalent of git format-patch ... | # first lose all \r\n

Re: [PATCH for-maint] apply: gitdiff_verify_name(): accept /dev/null\r

2014-09-23 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: SMTP transport may be CRLF-unsafe, so I have a suspicion that it may turn out that what you are trying to do might be an equilvalent of git format-patch ... | # first lose all \r\n dos2unix | # then make everything \r\n

Re: [PATCH for-maint] apply: gitdiff_verify_name(): accept /dev/null\r

2014-09-23 Thread Junio C Hamano
Laszlo Ersek ler...@redhat.com writes: On 09/23/14 22:02, Junio C Hamano wrote: Laszlo Ersek ler...@redhat.com writes: On 09/23/14 20:54, Junio C Hamano wrote: ... SMTP transport may be CRLF-unsafe, so I have a suspicion that it may turn out that what you are trying to do might be an

Re: [PATCH for-maint] apply: gitdiff_verify_name(): accept /dev/null\r

2014-09-23 Thread Laszlo Ersek
On 09/23/14 22:02, Junio C Hamano wrote: Laszlo Ersek ler...@redhat.com writes: On 09/23/14 20:54, Junio C Hamano wrote: ... SMTP transport may be CRLF-unsafe, so I have a suspicion that it may turn out that what you are trying to do might be an equilvalent of git format-patch ... |

Re: [PATCH for-maint] apply: gitdiff_verify_name(): accept /dev/null\r

2014-09-23 Thread Laszlo Ersek
On 09/23/14 21:56, Junio C Hamano wrote: Laszlo Ersek ler...@redhat.com writes: What do you think about accepting only /dev/null\n and /dev/null\r\n? I thought we agreed that what you are doing is not workable in the first place, no? I suspect one way to handle In this project, the

Re: [PATCH for-maint] apply: gitdiff_verify_name(): accept /dev/null\r

2014-09-23 Thread Junio C Hamano
Laszlo Ersek ler...@redhat.com writes: On 09/23/14 21:56, Junio C Hamano wrote: Laszlo Ersek ler...@redhat.com writes: What do you think about accepting only /dev/null\n and /dev/null\r\n? I thought we agreed that what you are doing is not workable in the first place, no? I suspect

Re: [PATCH for-maint] apply: gitdiff_verify_name(): accept /dev/null\r

2014-09-23 Thread Laszlo Ersek
On 09/23/14 22:35, Junio C Hamano wrote: Laszlo Ersek ler...@redhat.com writes: On 09/23/14 22:02, Junio C Hamano wrote: Laszlo Ersek ler...@redhat.com writes: On 09/23/14 20:54, Junio C Hamano wrote: ... SMTP transport may be CRLF-unsafe, so I have a suspicion that it may turn out that

Re: [PATCH for-maint] apply: gitdiff_verify_name(): accept /dev/null\r

2014-09-23 Thread Laszlo Ersek
On 09/23/14 22:40, Junio C Hamano wrote: Laszlo Ersek ler...@redhat.com writes: On 09/23/14 21:56, Junio C Hamano wrote: Laszlo Ersek ler...@redhat.com writes: What do you think about accepting only /dev/null\n and /dev/null\r\n? I thought we agreed that what you are doing is not workable

Re: [PATCH for-maint] apply: gitdiff_verify_name(): accept /dev/null\r

2014-09-23 Thread Junio C Hamano
Laszlo Ersek ler...@redhat.com writes: In summary: This is not entirely correct, though. But it suggests an avenue for a possible enhancement. - the email infrastructure turns all line terminators into CRLFs Yes, but that is within MTAs and is expected to be invisible at MUA level.

[PATCH for-maint] apply: gitdiff_verify_name(): accept /dev/null\r

2014-09-22 Thread Laszlo Ersek
The edk2 (EFI Development Kit II) project at https://github.com/tianocore/edk2/ uses CRLF line endings. The following small reproducer demonstrates how gitdiff_verify_name() breaks when it meets the usual git patches workflow in combination with CRLF line endings: 1. Prepare the test repo: