Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:02:34

Junio C Hamano [off-list ref] 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
        unix2dos |
        # and apply
        git am

which is not workable in the first place.  I dunno.
This is a tangent, but if the problem were slightly different, I
would be more sympathetic.  For example

    A popular MUA, when asked to write out a message in the mbox
    format, ends _all_ the lines in its output with CRLF, whether
    the original was sent as LF-only or CRLF, and there is no way to
    convince it to use LF-only.  "git apply" fails to grok such an
    input.

could be, if the use of such an MUA is very prevalent, a common
problem worth working around.

But then I would suspect that the workaround for such a case may not
be "accept /dev/null\n and /dev/null\r\n equally".  It is likely
that the right workaround for such a case would be to "turn all \r\n
into \n before processing".
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help