bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: Possible bug in gnu diff


From: Paul Eggert
Subject: Re: Possible bug in gnu diff
Date: Sat, 15 Nov 2003 22:47:39 -0800
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (usg-unix-v)

At Thu, 13 Nov 2003 14:06:30 -0500, Charles B Cranston <address@hidden> writes:

> I'm not sure if this is a bug or if its not supposed to work.
> I was trying to code a call to diff such that
>
> 1. the -i option is used to ignore case
>
> 2. the unchanged lines are output with
>      --unchanged-group-format
>
> Now, since with -i the lines from the first file and the lines
> from the second file can differ in case, I wanted to select which
> version of the line to send to the output using something like this:
>
> diff -i -I '<*>' --unchanged-group-format="%<"
>
> to select the version of the unchanged line from the first file and
>
> diff -i -I '<*>' --unchanged-group-format="%>"
>
> but when I did this I got spurious lines being deleted in some
> cases and duplicated in other cases, as if maybe %< and %> were not
> (always) valid in an --unchanged context.  Things seem somewhat
> better if I use "%=" but then sometimes the case is wrong as diff
> shows the version from the "wrong" input file.
>
> Do you want to see an example with a five line file?
>
> This is using the gnu diff from a MacOSX 10.1.4 and -version
> yields: diff - GNU diffutils version 2.7

Yes, please send a test case to <address@hidden>.

I can't reproduce the bug with diff 2.8.4; you might want to give it a
try first.

ftp://alpha.gnu.org/gnu/diffutils/diffutils-2.8.4.tar.gz




reply via email to

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