% printf 'a\nb\r\nc\n' > a % printf 'a\r\nb\r\nc\r\n' > b % diff --strip-trailing-cr a b ... @@ -1,3 +1,3 @@ a b -c + GNU diff would report no difference. The --strip-trailing-cr issue caused an LLVM test test/MC/AsmParser/preserve-comments-crlf.s to fail.
Please try: https://reviews.freebsd.org/D16451
A commit references this bug: Author: delphij Date: Fri Jul 27 05:21:20 UTC 2018 New revision: 336754 URL: https://svnweb.freebsd.org/changeset/base/336754 Log: Improve --strip-trailing-cr handling: - Advance ctold for f1 and ctnew for f2 - ungetc() if the character is unexpected - Don't break early when we hit the combination on one side PR: 230049 Reported by: maskray <emacsray gmail com> Reviewed by: bapt, maskray MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D16451 Changes: head/usr.bin/diff/diffreg.c head/usr.bin/diff/tests/diff_test.sh