Skip to content

Git - File comparison of staged changes, "Revert selected ranges" silently does nothing because comparison is opened in Read-Only mode ย #175786

Closed
@Alex2357

Description

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

  1. Open any git repo in vscode
  2. Open file for edit and insert 4 empty lines at the top
  3. Stage changes from that file
  4. Right click on staged file and compare. The file is opened in Read-Only mode
  5. Select the range of added 4 empty lines
  6. 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

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

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable buggitGIT issues

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions