Skip to content

[Bug] DiffViewFileHistory % --range=[commit-id] doesnt work on renamed files #593

Description

@eyalz800

Description

Hi,

Thank you for this great plugin.
When running:

:DiffViewFileHistory % --range=[commit-id]

Where the commit-id contains a change on the renamed file before it was renamed, the plugin executes:

git log --follow --pretty=format:%H --name-status [commit-id] -- [filename-after-rename]      

But this returns no output, and therefore the plugin fails to display the history.
When removing the [commit-id] the rename is detected but then the full history is presented rather than the specific commit change.

Please let me know if this doesnt repro for you.

Expected behavior

Detect renames and successfully display the diff

Actual behavior

Fails to display the diff

Steps to reproduce

Run

:DiffViewFileHistory % --range=[commit-id]

On a file that was renamed, the commit-id should be before the file was renamed

Health check

N/A

Log info

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

Neovim version

0.11.3

Operating system and version

Ubuntu 22.04

Minimal config

N/A

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions