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

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

A bug in the -B option of gnudiff?


From: Cory F. Cohen
Subject: A bug in the -B option of gnudiff?
Date: Mon, 18 Apr 2005 22:24:59 -0400
User-agent: Mozilla Thunderbird 0.9 (Windows/20041103)

Hello,

It would appear that my interpretation of "-B Ignore changes whose lines are all blank." is different than the one implemented in GNU diff. I would have expected that the result would have been the same as removing all blank lines from both files and then diffing.

This isn't a big deal, but I thought you might want to know, in case you considered it a bug too. The test case below should be pretty straight forward, but I included a couple of short hex dumps to make sure. It looks like a context problem, but I see no reason why -B shouldn't work anyway... Sorry I don't have a patch... :-)

$cat foo1
x

same string
y

same string
z

same string
done
$cat foo2
x
same string

y
same string

z
same string

done
$od -h foo1
0000000     780a    0a73    616d    6520    7374    7269    6e67    0a79
0000020     0a0a    7361    6d65    2073    7472    696e    670a    7a0a
0000040     0a73    616d    6520    7374    7269    6e67    0a64    6f6e
0000060 650a 0000062
$od -h foo2
0000000     780a    7361    6d65    2073    7472    696e    670a    0a79
0000020     0a73    616d    6520    7374    7269    6e67    0a0a    7a0a
0000040     7361    6d65    2073    7472    696e    670a    0a64    6f6e
0000060 650a 0000062
$gdiff -B foo1 foo2
4d2
< y
5a4
> y
7d5
< z
8a7
> z
$gdiff --version
diff (GNU diffutils) 2.8.1
Copyright (C) 2002 Free Software Foundation, Inc.

Thanks!
Cory




reply via email to

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