#1162 Diff Engine Assymetry

Branch
open
nobody
5
2006-02-13
2006-02-13
Anonymous
No

Version : 2.4.4.0 Unicode
OS : Windows 2003 Server

I'm getting two different outputs (Identical and
Different) depending on whether one of the files is on
the left side or right side when I compared the
following two files.

Left=file1.txt Rigth=file2.txt -> Identical
Left=file2.txt Rigth=file1.txt -> 2 Differences

Is this normal ?

Discussion

  • Nobody/Anonymous

    Two text files (file1.txt and file2.txt) are included in the rar

     
  • elsapo

    elsapo - 2006-02-13

    Logged In: YES
    user_id=1195173

    No, that is not normal -- it sounds likea bug.

    You didn't give your configuration -- you should (I think)
    at least give the needed comparison settings when reporting
    a diff bug -- that is, in the options, are you comparing
    whitespace? are blank lines counted? are carriage return
    differences counted?

    But I looked at it anyway, and reproduced it with Ignore
    Blank lines, but only in 2.4. cvs trunk seems to get it
    right. So hopefully this is fixed by one of the pending
    diffutils engine patches which have not yet been applied to
    2.4 version.

    Assigning to group Branch.

     
  • elsapo

    elsapo - 2006-02-13
    • milestone: --> Branch
     
  • elsapo

    elsapo - 2006-02-13

    Logged In: YES
    user_id=1195173

    I take it back; I think cvs trunk also suffers from this :(

     
  • elsapo

    elsapo - 2006-02-14

    Logged In: YES
    user_id=1195173

    I note that my cygwin diff gives asymmetric results as well
    (altho it doesn't consider them identical either way):
    ***

    $ diff -B file1.txt file2.txt
    2d1
    <
    3a3
    >

    $ diff -B file2.txt file1.txt
    2d1
    < This is a sample line
    3a3
    > This is a sample line

     

Log in to post a comment.