Git - File comparison of staged changes, "Revert selected ranges" silently does nothing because comparison is opened in Read-Only mode ย #175786
Closed
Description
opened on Mar 1, 2023
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.74.1
- OS Version: Fedora release 37 (Thirty Seven)
Steps to Reproduce:
What I did
- Open any git repo in vscode
- Open file for edit and insert 4 empty lines at the top
- Stage changes from that file
- Right click on staged file and compare. The file is opened in Read-Only mode
- Select the range of added 4 empty lines
- Click right click and Select from the context menu "Revert Selected Ranges"
What I got:
- Nothing
What I (incorrectly) expected to get:
- The command would undo selected ranges
What I expect to get:
- To be notified "You'have opened staged changes in read-only mode. You're not supposed to modify staged changes. To modify staged, unstage changes first, perform changes and stage again"
If the message above is too verbose, than at least message like "Staged changes are not supposed to be edited", that will be enough to understand what is going on.
Activity