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

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

[Bug-gnu-utils] Re: diff3 incorrectly says conflicts


From: Karl Tomlinson
Subject: [Bug-gnu-utils] Re: diff3 incorrectly says conflicts
Date: Mon, 18 Sep 2000 11:16:47 +1200

Note that
`cat YOURFILE | diff3 -m OLDFILE OLDFILE -'
gives the correct answer.

This is essentially what I sent to bug-cvs on 2000-08-14, subject
`Re: CVS/Diff merge defect. (fwd)'.  This was related to a partial fix
of merging in version 2.7.2 of diffutils that helped some cases but made
other worse.

remember: diff3 OPTIONS... MYFILE OLDFILE YOURFILE

The better answers when YOURFILE is STDIN are due to OLDFILE (instead of
YOURFILE) being the common file in the two diffs that are run.  When
MYFILE is compared to OLDFILE it gives a better indication of the
intended changes to the file.  The file was not changed from YOURFILE to
MYFILE so a diff between these two files has little information about
what the intended changes were.  See also comments in the patch
supplied.

Does anyone know if there was a reason why YOURFILE was used as the
common file for the two diffs?  Ediff for emacs uses OLDFILE as the
common file and has always worked well for me.

I have another example attached which gives the same (incorrect) answers
to 
`diff3 -E -am test2-mine test2-older test2-yours' (test2-merged-2.7)
with either version 2.7 or 2.7.2 of diffutils, but the same (correct)
answers to
`cat test2-yours | diff3 -E -am test2-mine test2-older -'
(test2-merged-2.7-stdin).

I include patches for version 2.7 of diffutils to use OLDFILE as the
common file when a merge or edscript is requested of diff3.  I think the
--inhibit-hunk-merge option of 2.7.2 is no longer required.

Karl

Attachment: diff-bug.tar.gz
Description: GNU Zip compressed data


reply via email to

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