diffview.nvim icon indicating copy to clipboard operation
diffview.nvim copied to clipboard

[info] diffview as git diff tool

Open componhead opened this issue 1 year ago • 2 comments

Is it possible to use diffview as a git difftool? Because when I try, with a working dir clean, git ask me the usual question on diffing the file but the diff is void. I use the configuration:

[diff]
	tool = nvimdiff
[difftool "nvimdiff"]
	cmd = "nvim -f -c \"DiffviewOpen\""

with git difftool HEAD..origin/master the diff is void but, with files in working dir (i.e.: after git reset --mixed HEAD^) the diffing works as expected.

componhead avatar Dec 02 '24 08:12 componhead

I tried with:

[diff]
	tool = nvimdiff
[difftool "nvimdiff"]
	cmd = "nvim -c \"DiffviewOpen\""

I.e. without the -f flag, and it works fine.

maltaisn avatar Apr 30 '25 15:04 maltaisn

cmd = "nvim -c \"DiffviewOpen\""

Works incorrectly. Try:

git nvimdiss @~4

For example it returns 3 files changed, but diff shows first file 3 times.

zdm avatar May 01 '25 20:05 zdm