This is the mail archive of the
mailing list for the Cygwin project.
Re: Patch and Cygwin
On Fri, Dec 16, 2005 at 01:07:30AM +0100, Lennart Borgman wrote:
> This is a summary of my tests with Cygwin patch and different line
> ending styles. (Only LF and CRLF are tested here.)
> I have downloaded patch 2.5.9 from
> ftp://alpha.gnu.org/gnu/diffutils/patch-2.5.9.tar.gz and compiled it
> using Cygwin. I have used this patch and the patch that currently comes
> with Cygwin to do some tests of patch and diff when the files to compare
> and patch have different line ending styles. I have also made this test
> using MSYS and GnuWin32 utilities.
> The result is that the only option that seems to be able to handle the
> mix of line endings is Cygwin using DOS line endings with patch 2.5.9.
> (The only thing that did not work was preservation of line endings in
> the patched file, but that seems to be a small problem here.)
I'm not sure the line you are pursuing is going to be a productive one.
While automatically working despite CR-mismatches would be good, I'm
concerned that you'll break other things (patches on files with varying
line endings, patches that are intended to change line endings).
Ideally, patch should exactly follow what diff does, and diff does
treat CRLF vs LF differences as significant, even in a textmount. The
exception is when specifically requested by the --strip-trailing-cr
option, which makes diff entirely CRLF/LF-blind. Implementing this
option for patch would be much better than trying to do anything
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html