Open SevereOverfl0w opened 6 years ago
Not sure that making this configurable is the way to go. But let's start by enumerating what options people would want to set. -w
and --word-diff
seem like the biggies. What else?
Note you can do :Git show -w !
to get a one off display of the current commit.
Any movement on this? I just added https://github.com/nerdrew/vim-fugitive/commit/8076b298afea9c828e9fc9fb545708a57a511d57 to my fork to see if it does what I want.
One issue so far: when ignoring whitespace, you can't stage the diff. To stage the diff, I need to un-ignore whitespace again.
I added a similar toggle for --word-diff
, but the output is different, so it doesn't show any diff (presumable because the diffs don't have +
or -
in the first column).
One issue so far: when ignoring whitespace, you can't stage the diff. To stage the diff, I need to un-ignore whitespace again.
The original request was for viewing a commit. Changing it in the status buffer is a non-starter for this reason alone.
Unless of course you find some way to cross reference the line numbers in the vanilla diff and the cosmetically altered diff and make it work anyways. But I'm going to work under the assumption that's impossible until proven otherwise.
This would allow me to add
-w
to ignore whitespace changes ingit show
. This can make many changes in Clojure where a top level function call was made, much easier to read.One idea might be that this is another format type that commit has, and is just simply built in. Another is that users can alter the array at any time. Another would be that I call a public interface to s:ReplaceCmd directly.
Do you have a preferred way that an implementation to allow me to achieve an ignoring whitespace commit object?
For now, I am using this patch: