Re: [PATCH for-maint] apply: gitdiff_verify_name(): accept "/dev/null\r"
- From
- Laszlo Ersek <lersek@redhat.com>
- Date
- Sep 23, 2014, 20:33 UTC
- Message-ID
- <5421D900.7060607@redhat.com>
- In-Reply-To
- <xmqqwq8ui00n.fsf@gitster.dls.corp.google.com>
On 09/23/14 21:56, Junio C Hamano wrote:
Show 17 quoted lines
> Laszlo Ersek <lersek@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 endings no matter what the > platform is" might be to use the line ending attributes to force > that while keeping the in-repository data with LF line endings. The > diff output (format-patch output is just one of them) comes from > comparing the in-repository representation, so you won't have \r\n > that will be stripped via MTA in it, "apply" and "am" will apply the > patch without having to worry about \r\n, _and_ the line ending > attributes would end the lines in your in-working-tree files with > CRLF that way.
This would be a perfect solution if the git repository was not a mirror of a Subversion repository that contains all files with embedded CRLFs.
Anyway I accept defeat, thanks for your time.
Laszlo