GNU bug report logs -
#51958
Difference between "diff" and "diff3"
Previous Next
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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 #
[Message part 2 (text/html, inline)]
[original.txt (text/plain, attachment)]
[after_change.txt (text/plain, attachment)]
[diff_diff3_output.txt (text/plain, attachment)]
[VSCode.png (image/png, attachment)]
This bug report was last modified 3 years and 210 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.