[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: Karl Berry
Subject: Re: [bug-patch] Re: patch troubles with CRLF's again
Date: Sun, 15 Mar 2009 17:33:18 -0500

    Patch could look at the source file, try to figure out how "most"
    lines end, and use the same line ending for new lines. 

Right.  In the normal case, it will be 100% CRLF or 100% LF.
If it's mixed, it doesn't really matter what you do, since the situation
is confused already.

    How about new files though --- which line ending to use there?

Follow the host system.

    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.)

I agree.  But the "creating" caveat is important -- when patching an
*existing* file, I think it is (much) better to follow the convention of
the existing source file, independent of the host system.


reply via email to

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