[Looks like a real bug to me. Haven't tried putting it in sanity.sh format yet (or trying to figure out whether it has anything to do with the analyze.c change which was checked into CVS on 6 Nov 1997). -kingdon] Return-Path: To: Paul Eggert , bug-gnu-utils@gnu.org Cc: info-cvs@gnu.org Subject: diff3 bug? (cvs-related) From: Jim Meyering Content-Type: text/plain; charset="iso-8859-1" Date: 05 Dec 1998 00:04:11 -0600 Hi Paul, This sure looks odd. Is it a bug? Here are the inputs: $ head mine older yours ==> mine <== start int *B; while (1) ==> older <== start foo = 0; int *B; while (1) ==> yours <== start foo = 0; int *c; while (1) Here are the two plain diffs: $ diff -u older mine --- older Fri Dec 4 22:24:33 1998 +++ mine Fri Dec 4 22:36:46 1998 @@ -1,7 +1,5 @@ start -foo = 0; - int *B; while (1) $ diff -u older yours --- older Fri Dec 4 22:24:33 1998 +++ yours Fri Dec 4 22:24:29 1998 @@ -2,6 +2,6 @@ foo = 0; -int *B; +int *c; while (1) And here's the output. It sure seems wrong in that I'd have expected the `int *B;' line to be inside the `<<<<<<< mine'-delimited conflict block. $ diff3 -E -am mine older yours start int *B; <<<<<<< mine ======= int *c; >>>>>>> yours while (1) This is the output I would have expected: $ cat expected start <<<<<<< mine int *B; ======= foo = 0; int *c; >>>>>>> yours while (1) I'm using this version: $ diff3 --version diff3 (GNU diffutils) 2.7.2 Copyright 1988, 89, 92, 93, 94, 95, 96, 1998 Free Software Foundation, Inc. This program comes with NO WARRANTY, to the extent permitted by law. You may redistribute copies of this program under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING. Written by Randy Smith. FYI, this exercise started when a cvs update of a 12,000-line file pulled in ~150 changes and got some conflicts and the surprising merge result. Regards, Jim