Search:

PmWiki

pmwiki.org

edit SideBar

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.

https://stackoverflow.com/questions/16423024/how-can-i-diff-2-files-while-ignoring-leading-white-space

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).


Page last modified on January 28, 2022, at 02:34 PM