Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
rfagen opened this issue Apr 24, 2015 · 3 comments · Fixed by #150
Closed

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

rfagen opened this issue Apr 24, 2015 · 3 comments · Fixed by #150

Comments

@rfagen
Copy link

rfagen commented Apr 24, 2015

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"

@danvk
Copy link
Owner

danvk commented Apr 24, 2015

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

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

@rfagen
Copy link
Author

rfagen commented 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 " -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.

@danvk
Copy link
Owner

danvk commented Sep 6, 2022

Closing this in favor of #129

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants