webdiff icon indicating copy to clipboard operation
webdiff copied to clipboard

Enable passing '-w'/'--ignore-all-space' diff options

Open rfagen opened this issue 10 years ago • 2 comments

I tried looking through the source code to see if this was an available option, but I couldn't find it if it is. I tried to follow the code to see where the actual diffing takes place and whether my python-fu would be up to submitting a pull request. My understanding ran into a dead-end in localfilediff.py

On reflection, maybe this request should be "enable passing diff options from command line to diffing engine"

rfagen avatar Apr 24 '15 21:04 rfagen

The diffing actually gets done in JavaScript, by codediff.js.

Is -w something you'd usually pass to git difftool?

danvk avatar Apr 24 '15 21:04 danvk

Hm. I don't normally use "git difftool", but the man page says that it implements all the options for "git diff" (one of which is '-w' for ignoring whitespace diffs). However, when I try to use "git difftool" it doesn't appear to be passing options along. I tried: git difftool -w -x "diff" git difftool -x "diff " -w and neither ignored a whitespace diff in my sample file. When I tried: git difftool -x "diff -w " the diff did ignore the whitespace. Just to be paranoid, I also tried: git -w difftool -x "diff " and got "unknown option", so I had the -w in the right place.

I guess I was coming from diff or git diff instead of specifically coming from git difftool. The first two have mostly had the same usage up until now :)

Either way, the point may be moot if difftool isn't passing options like the manpage suggests it does.

I don't think I see a straightforward win here, so feel free to close this.

rfagen avatar Apr 24 '15 22:04 rfagen

Closing this in favor of #129

danvk avatar Sep 06 '22 19:09 danvk