gnu-arch-users
[Top][All Lists]
Advanced

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

Re: [Gnu-arch-users] Re: Semi-severe bug in tla-cygwin 1.2.1-dirnames


From: Stephen J. Turnbull
Subject: Re: [Gnu-arch-users] Re: Semi-severe bug in tla-cygwin 1.2.1-dirnames
Date: Fri, 08 Oct 2004 10:22:44 +0900
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.5 (chayote, linux)

>>>>> "John" == John Meinel <address@hidden> writes:

    John> Or possibly to have patch just ignore the line endings. I
    John> know there is a command to tell patch to ignore whitespace,
    John> I wonder if that would work for things like this.

Do you mean "patch" or "diff" here?  I don't see how this could
possibly work right with patch (eg, suppose you apply a Unix NL patch
to a Windows CRLF file? Gaak!)  I guess you could have patch strip the
line ending off of all input lines before doing the compare, and
output lines with the local file's newline convention.  (ISTR Python
2.4's ndiff module allows this.)  The only problem I can think of
would be if somebody has invented a file format with (a) spurious NLs
to make patch work effectively and (b) significant CRs in the binary
format.  Could anybody be that perverse?  (Well, We Are Devo ....)

I just tested diff -w and it ignores CR as you expected.  However, I
don't see how it could possibly be a good idea except for cleaning
some cruft out of human-readable reports.  If you do

          diff -uw file1.nl file2.crlf | patch -p 0 file1.nl

you will get mixed NL and CRLF lines.  (Unless the patch is null or
the whole file.)


-- 
Institute of Policy and Planning Sciences     http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba                    Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
               Ask not how you can "do" free software business;
              ask what your business can "do for" free software.




reply via email to

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