Skip to content

[Bug] regression since PR #356 -- revert only works once #373

@emmanueltouzery

Description

@emmanueltouzery

Description

Since PR #356 was merged, reverting modified files for git works only for the first file. After that the action is without effect.

Expected behavior

Enter the diffview for a project in which multiple files were modified. Press X to revert the changes in multiple individual files. X should cause the changes for each individual files to be reverted.

Actual behavior

X works only for the first file.

Steps to reproduce

  1. Enter the diffview for a project in which multiple files were modified (:DiffviewOpen)
  2. Press X to revert the changes in multiple individual files.
  3. Notice that X works only the first time

Health check

Output of :checkhealth diffview
==============================================================================
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.40.1)
- WARNING Configured `hg_cmd` is not executable: 'hg'


Log info

No response

Neovim version

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

Operating system and version

Linux 6.3.5-200.fc38.x86_64 x86_64 GNU/Linux

Minimal config

No response

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