-
Notifications
You must be signed in to change notification settings - Fork 328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: viewing diff with diffview.nvim
not working
#304
Comments
Thank you for the fix @folke, but After Lazy check and you get updates. Press But if you go to Edit: Weird, sometimes it work and sometimes not... |
You need to press |
I'll to screen record... Yes, I press If I repeat the same action with other diff value it works just fine. I've tried |
I can't reproduce this. Do be aware that you need internet connection and need to wait a bit for the diff to load, since lazy uses partial commits. When showing a single commit for which git does not yet have the blobs, they will be downloaded on demand. |
lazy.nvim/lua/lazy/view/diff.lua Lines 27 to 29 in e77be3c
Diffview always treats git revs the same way as The notation |
@sindrets updated, thanks! |
Thank you. Changing those line as suggested fix the issue diff --git a/lua/lazy/view/diff.lua b/lua/lazy/view/diff.lua
index 24955b8..f4fe5af 100644
--- a/lua/lazy/view/diff.lua
+++ b/lua/lazy/view/diff.lua
@@ -25,7 +25,7 @@ M.handlers = {
["diffview.nvim"] = function(plugin, diff)
local args
if diff.commit then
- args = ("-C=%s"):format(plugin.dir) .. " " .. diff.commit
+ args = ("-C=%s"):format(plugin.dir) .. " " .. diff.commit .. "^!"
else
args = ("-C=%s"):format(plugin.dir) .. " " .. diff.from .. ".." .. diff.to
end |
Ops... @folke is too fast 🥂 |
Did you check docs and existing issues?
Neovim version (nvim -v)
NVIM v0.9.0-dev-cb9d68fe
Operating system/version
MacOS 10.15.7
Describe the bug
On first start diffview open with empty file. Subsequent open will give error
[Diffview.nvim] Not a repo (or any parent), or no supported VCS adapter!
Steps To Reproduce
Expected Behavior
Actual diff is shown.
Repro
The text was updated successfully, but these errors were encountered: