You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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"
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.
Activity
danvk commentedon Apr 24, 2015
The diffing actually gets done in JavaScript, by codediff.js.
Is
-wsomething you'd usually pass togit difftool?rfagen commentedon Apr 24, 2015
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 " -wand 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
difforgit diffinstead of specifically coming fromgit 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.
danvk commentedon Sep 6, 2022
Closing this in favor of #129