sindrets / diffview.nvim

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

[Bug] Missing Deleted files when show the changes #430

Closed LintaoAmons closed 11 months ago

LintaoAmons commented 11 months ago

Description

Here's the content by git show <commit-sha>

image

But it didn't show in the DiffviewOpen <commit-sha> image

Expected behavior

Show the same changes even it's a deletion

Actual behavior

The deleted files are missing

Steps to reproduce

  1. git commit with files deleted
  2. DiffviewOpen <commit-sha>

Health check

should be fine

Log info

Relevant info from :DiffviewLog ``` ############################ ### PUT LOG CONTENT HERE ### ############################ ```

Neovim version

NVIM v0.9.0
Build type: Release
LuaJIT 2.1.0-beta3

Operating system and version

Mac

Minimal config

No response

sindrets commented 11 months ago

:DiffviewOpen <REV> gives you the diff between <REV> and the working tree. If the file was deleted in <REV>, and it's still deleted, then the diff between them is the empty set.

The equivalent of doing git show <REV> is :DiffviewOpen <REV>^!. This describes the range of a single commit.

For more info on Git's rev syntax, see "SPECIFYING REVISIONS" and "SPECIFYING RANGES" under $ man git-rev-parse.

LintaoAmons commented 11 months ago

Thx~ Now I understand more about git! But How do you think about the idea to add a Command DiffviewShow <REF>