gitbutler icon indicating copy to clipboard operation
gitbutler copied to clipboard

Changed staged in the index can't be discarded or aren't handled at all

Open Byron opened this issue 1 year ago • 0 comments

Version

0.12.16

Operating System

Mac OS X

Distribution Method

dmg (Apple Silicon)

Describe the issue

When a change lives solely in the index, it can't be discarded as GitButler doesn't seem to recognize it as index-change.

How to reproduce

  • Run git rm --cached <some-file> in a GitButler project
  • observe that the UI doesn't recognize the change and won't show it, even when refreshed
  • Delete the file in the worktree with rm <some-file>, and the UI will recognize the deletion
  • select the deleted file and hit Discard changes in the RMB-click popup
  • the following error shows
Screenshot 2024-08-02 at 09 51 16

Further testing showed that changes to the index are generally not visible to GitButler

Alternatively to the steps above, the following file contains a repository in such a state: rgit.zip

Expected behavior

No response

Relevant log output

No response

Byron avatar Aug 02 '24 07:08 Byron