sindrets / diffview.nvim

Single tabpage interface for easily cycling through diffs for all modified files for any git rev.
Other
3.57k stars 101 forks source link

fix: Handle rev ranges that resolve to `LOCAL..{REV}` #436

Closed refractalize closed 7 months ago

refractalize commented 8 months ago

I noticed that the :DiffviewOpen ..commit --imply-local didn't show all the diffs I was expecting, and only shows diffs for files that were modified in the working copy - or indeed no diffs if the working copy is clean.

:DiffviewOpen commit --imply-local does work, the only difference being that it puts the commit files on the left, not the right. Also, :DiffviewOpen origin/master..commit --imply-local fails in the same way as :DiffviewOpen ..commit --imply-local, but only when your checked out commit is the same as origin/master (this is what confused me originally!)

Anyway, it turns out we were just missing a case where the left-hand-side of the diff is local and the right-hand-side is a commit, so I've added that in this PR.

sindrets commented 7 months ago

Let me have a look at it actually. I think we can fix this quite easily.

sindrets commented 7 months ago

Thanks!

refractalize commented 7 months ago

Thanks @sindrets !