Skip to content

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

Closed

Description

@rfagen

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"

Activity

  1. danvk commented on Apr 24, 2015

    @danvk
    Owner

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

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

  2. rfagen commented on Apr 24, 2015

    @rfagen
    Author

    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.

  3. danvk commented on Sep 6, 2022

    @danvk
    Owner

    Closing this in favor of #129

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions