[Top][All Lists]

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

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

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

On Sunday, 15 March 2009 22:44:36 Mike Frysinger wrote:
> a better heuristic would be to actually test the line being patched.  does
> it end with CRLF ?  if so, leave the CRLFs in the hunk alone.  if it
> doesnt, automatically rip out the CR.

Patch could look at the source file, try to figure out how "most" lines end, 
and use the same line ending for new lines. How about new files though --- 
which line ending to use there?

It is not that uncommon to end up with CRLF line endings in patches received 
via email and/or from Windows. When running on a UNIX system, IMHO patch 
should try to by a good citizen and default to UNIX semantics rather than 
creating files with CRLF line endings. (Unless told otherwise, of course.)


reply via email to

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