Discussion:
Make diff ignore whitespace differences
Phillip Farber
2010-06-18 15:57:28 UTC
Permalink
What would be the easiest/right way to make magit ignore whitespace
differences in diffs? Sort of like the -b and -B options that diff
supports.

Thnaks,

Phil
Ævar Arnfjörð Bjarmason
2010-06-18 16:37:49 UTC
Permalink
Post by Phillip Farber
What would be the easiest/right way to make magit ignore whitespace
differences in diffs?  Sort of like the -b and -B options that diff
supports.
;; maybe this?
(setq magit-diff-options '("-b"))
Óscar Fuentes
2010-06-18 16:50:54 UTC
Permalink
Post by Phillip Farber
What would be the easiest/right way to make magit ignore whitespace
differences in diffs? Sort of like the -b and -B options that diff
supports.
git diff has -b (aka --ignore-space-change) -w (aka --ignore-all-space)
and --ignore-space-at-eol

That said, it depends on what you mean by "ignore whitespace differences
in diffs". magit shows diffs at several places and on some of them
(i.e. the status buffer) makes little sense to hide any changes.

If you want to hide whitespaces on buffers showing changes from one
revision to another, you can experiment setting the variable
magit-diff-options. I don't know how well it works.

Loading...