Main / Diff
The diff white space ignore options like -w and -b are broken when it comes to newlines. Even the -d sadly doesn't help. As a result, diff will report a file difference even when it's simply a case of some part of a line being moved to the next line. You have to strip newlines from a diff input file before comparing, but that's problematic. Most common diff usage on folders is diff -wr -q if you want to count differences only (don't show lines). To see if a folder hierarchy differs, you'd use diff -wrq. -u is for the unified format preferred for patching. By default, diff reports on symlinks being different at binary level. Use --no-dereference version 3.3 and up to leave them out (I think it will just verify the path). |