Closed ghost closed 7 years ago
Oops, I think this was not really the problem. This error actually happens if I edit a file in a non-existing directory. For example, I edit "src/bin/test.rs", but "src/bin" doesn't exist. Then wstrip errors out. It's not really this plugin's fault. :)
Hmm, but I think the plugin shouldn't do things when it can't do things. Maybe a different PR where buffers with non-existent files are completely ignored.
I think this PR also makes sense. There wouldn't be a need to git diff
a file that isn't tracked in the repo.
~~If you edit a file in a Git repository that is not yet tracked,
:WStrip
will error out with something like:~~~~Therefore, for such files we must still use regular
diff
instead ofgit giff
.~~