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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/23/14 22:02, Junio C Hamano wrote:
> Laszlo Ersek <lersek@xxxxxxxxxx> 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
>>>         dos2unix | 
>>> 	# then make everything \r\n
>>>         unix2dos |
>>>         # and apply
>>>         git am
>>>
>>> which is not workable in the first place.  I dunno.
>>
>> I agree with your analysis. It is indeed the MTA...
>>>    - CR and LF MUST only occur together as CRLF; they MUST NOT appear
>>>      independently in the body.
>>
>> But why is this situation "not workable"? The same happens with *all*
>> patches that people mail around, it's just not visible to them, because
>> git-am strips all CRs indiscriminately.
> 
> It is not "git am" or "git apply" that "strips all CRs
> indiscriminately".  I just tried to apply 0001-add-f2 without
> letting your MTA/MUA corrupt it on "master" branch in the repository
> you prepared that patch from, i.e.
> 
> 	git checkout master^0 ;# go back
>         git am 0001-add-f2* ;# apply that "+hello world\r\n" patch
>         git diff branch ;# nothing

When you did this, was am.keepcr=true in effect?

Thanks
Laszlo
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]