In the magit-status buffer I can press d-wd on a file to open a magit-diff buffer with the diff of that specific file without whitespace changes. When I go back to magit-status though, the diffs there still show the original whitespace changes. I'm not sure if this is built into magit already but what I'd like is for the original magit-status buffer to ignore whitespace changes as well (being able to toggle this would be amazing)
In magit-status, enter the diff mode by pressing d like you've done. Make your -w change. Then press C-x to see that there is an extended magit menu with more available items. You'll then see that C-s is a means to Save the settings you've made (e.g., --ignore-all-space) for future sessions.
I had just this query. I think it makes sense to be able to ignore whitespace in the status buffer because you'll often want to see 'at a glance' just the significant changes you have made. In particular, when rebasing the extra hassle of switching to another window for this kind of sanity check can disturb what is already a fairly delicate workflow.
I found the solution here, reproduced for convenience:
You can press
D(magit-diff-refresh-popup), set the flags you want (e.g.,-bfor--ignore-space-change), and then hitg.
You can also do C-x C-s as described in the accepted answer or w instead of g to save the defaults for again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With