[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-patch] Re: patch troubles with CRLF's again
From: |
Micah Cowan |
Subject: |
Re: [bug-patch] Re: patch troubles with CRLF's again |
Date: |
Wed, 18 Mar 2009 09:51:04 -0700 |
User-agent: |
Thunderbird 2.0.0.19 (X11/20090105) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Andreas Gruenbacher wrote:
> 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?
I would expect it to be highly unusual for the patches he described
_not_ to have been produced on Windows in the first place.
Perhaps a better check for mangling (though possibly significantly more
difficult?) would be to compare the expected "original" lines with the
_actual_ original lines. If the patch has CRLF where the original had
LF, that may be a good sign of mangling?
- --
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer.
Maintainer of GNU Wget and GNU Teseq
http://micah.cowan.name/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAknBJncACgkQ7M8hyUobTrFmIgCfRCpe4LeVY9qk+6mtY3ulIJUV
bn0An0QoKXFB7IUBN9701VK5OH14cbT+
=vZtb
-----END PGP SIGNATURE-----
- [bug-patch] Re: patch troubles with CRLF's again, Andreas Gruenbacher, 2009/03/15
- [bug-patch] Re: patch troubles with CRLF's again, Andreas Gruenbacher, 2009/03/15
- Re: [bug-patch] Re: patch troubles with CRLF's again, Karl Berry, 2009/03/15
- Re: [bug-patch] Re: patch troubles with CRLF's again, Andreas Gruenbacher, 2009/03/16
- Re: [bug-patch] Re: patch troubles with CRLF's again, Karl Berry, 2009/03/16
- Re: [bug-patch] Re: patch troubles with CRLF's again, Andreas Gruenbacher, 2009/03/16
- Re: [bug-patch] Re: patch troubles with CRLF's again, Karl Berry, 2009/03/18
- Re: [bug-patch] Re: patch troubles with CRLF's again, Andreas Gruenbacher, 2009/03/18
- Re: [bug-patch] Re: patch troubles with CRLF's again,
Micah Cowan <=
- Re: [bug-patch] Re: patch troubles with CRLF's again, Eli Zaretskii, 2009/03/20
- Re: [bug-patch] Re: patch troubles with CRLF's again, Andreas Gruenbacher, 2009/03/18