Open TJ-Adams opened 1 week ago
Easy workaround in the meantime is to just use command DiffviewOpen <SHA1>~1..<SHA1>
. Thank you for the plugin! I think it's pretty great.
I find this a little annoying as well. commit^!
or <SHA1>~1..<SHA1>
just don't feel very ergonomic, and the former isn't very common imo. I'm guessing they are replicating the behavior of git diff
as opposed to git show
in this case. With that said, this probably isn't a bug, but the docs could be clarified.
Description
From the README.
From reading this, providing a git revision such as a SHA1 should only show changes provided by that change and that change only. However I'm seeing that it shows the difference against the HEAD, which if you go far back makes the diff seem huge.
I did a quick initial triage and it seems to be because in the function
diffview_open
, theright
parameter is always set toLOCAL
when only the SHA1 is given.Expected behavior
No response
Actual behavior
Providing the valid git rev, SHA1 in this case, should show only the changes that occurred for that revision.
Steps to reproduce
nvim -u mini.lua
with the provided minimal config belowHealth check
Output of
``` diffview: require("diffview.health").check() Checking plugin dependencies ~ - OK nvim-web-devicons installed. Checking VCS tools ~ - The plugin requires at least one of the supported VCS tools to be valid. - OK Git found. - OK Git is up-to-date. (2.39.3) - WARNING Configured `hg_cmd` is not executable: 'hg' ```:checkhealth diffview
Log info
Relevant info from
``` ############################ ### PUT LOG CONTENT HERE ### ############################ ```:DiffviewLog
Neovim version
Operating system and version
Darwin 23.5.0 arm64
Minimal config