Skip to content

Git - Unable to set a shortcut to stage or revert git change after Show Next Change (when dirtyDiffVisible)ย #62534

Closed as not planned
@dhalima3

Description

  • VSCode Version: 1.28.2
  • OS Version: macOS High Sierra 10.13.5

Steps to Reproduce:

  1. Assign a shortcut to stage and revert change when dirtyDiffVisible. Below is what I had in my keybindings.json file.
    {
        "key": "alt+cmd+a",
        "command": "git.stageChange",
        "when": "dirtyDiffVisible"
    },
    {
        "key": "alt+cmd+z",
        "command": "git.revertChange",
        "when": "dirtyDiffVisible"
    }
  1. Load a file with some unstaged changes. Use command Show next change from the command palette to go to next change and bring up dirty diff view. When evoking the shortcut to either stage or revert the change, the following error message pops up "Git: Cannot read property 'toString' of undefined"

Clicking the buttons manually doesn't produce the issue, but using the keyboard shortcut does. As you can see from the screenshot, it seems like vscode has correctly mapped the action to the shortcut.

screenshot 2018-11-04 01 19 15

screenshot 2018-11-04 01 22 35

Does this issue occur when all extensions are disabled?: Yes

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 bugscmGeneral SCM compound issues

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions