|
From: | marc |
Subject: | [bug-diffutils] bug#51958: Difference between "diff" and "diff3" |
Date: | Thu, 18 Nov 2021 15:04:55 -0500 |
Hello Everyone, If the end of an inserted block matches the end of the block preceding the insert, then the output between “diff” and “diff3” is not the same. It looks like “diff” takes LCS from the end up, while “diff3” goes top down which is more natural to the eye (see attached VS Code output, which matched diff3). Is this a known issue, intended, or something that should be addressed? Kind regards, Marc PS: This is based on diffutils 3.8 stable mbtlinux:/sap/downloads # diff original.txt after_change.txt 6a7 > METHODS test_3. 16a18,26 > IF 1 = 2. > BREAK-POINT. > ENDIF. > ENDMETHOD. > > > > METHOD test_3. > "method 3 mbtlinux:/sap/downloads # diff3 original.txt original.txt after_change.txt ====3 1:6a 2:6a 3:7c METHODS test_3. ====3 1:21a 2:21a 3:23,31c METHOD test_3. "method 3 IF 1 = 2. BREAK-POINT. ENDIF. ENDMETHOD. mbtlinux:/sap/downloads # |
original.txt
Description: Text document
after_change.txt
Description: Text document
diff_diff3_output.txt
Description: Text document
VSCode.png
Description: PNG image
[Prev in Thread] | Current Thread | [Next in Thread] |