In Magit I sometimes toggle Ignore all whitespace
in the status buffer. This causes files that contain only whitespace changes to disappear. This means I cannot operate on them without toggling Ignore all whitespace
and refreshing. Is there any option to change this behaviour?
1 Answer
Magit just runs git diff --ignore-all-space ...
. That does not output files that contain only whitespace changes and so Magit doesn't display those either. I think it makes sense for Git/Magit to do that, it's kinda what you requested by using --ignore-all-space
.
This means I cannot operate on them
You should still be able to do so. Many commands that default to the file at point (with or without confirmation) instead ask you for a file when invoked while point is not on a file.
So for example to stage a file that only contains whitespace changes move point to something that cannot be staged (e.g. onto "Unmerged into master") and press s as usual and then select the file you want to stage.
-
Yes, that makes sense. I can stage it as you proposed and that is fine, but what I think I want is something similar to what
git status
gives me on the command line. Here I can see the staged file no matter what diff options I use. Sep 26, 2017 at 12:00