bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: [bug-patch] Re: patch troubles with CRLF's again


From: Andreas Gruenbacher
Subject: Re: [bug-patch] Re: patch troubles with CRLF's again
Date: Wed, 18 Mar 2009 15:15:14 +0100
User-agent: KMail/1.9.9

On Wednesday, 18 March 2009 14:50:56 Karl Berry wrote:
>     Let me restate: I want patch to default to native line endings on
>     each platform
>
> The thing is, there are times when you want a patch file with non-native
> line endings. Forcing every patched file to native line endings, 
> ignoring whatever it was before, just seems suboptimal to me.  People
> send me (on Unix) CRLF patches for .bat or .ini whatever files in
> packages I maintain.

We still misunderstood: the code isn't enforcing native line endings at all. 
It *only* tries to recognize patches that have been *entirely* CRLF mangled. 
It does so by looking *only* at header lines.

When you apply diff to CRLF files, you get a patch with LF endings i the 
headers and CRLF endings in the old/new and context lines. (At least on 
POSIX; on Windows, I would expect not.)

So the case you describe will work perfectly well, unless the patch gets 
*entirely* CRLF mangled (or was produced on Windows in the first place).

Does that sound better now, or do you still disagree?

Thanks,
Andreas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]