Microsoft/vscode

Git - "Discard Changes" and "Stage Changes" don't work for submodules

Open

#205,125 建立於 2024年2月13日

在 GitHub 查看
 (17 留言) (8 反應) (1 負責人)TypeScript (10,221 fork)batch import
buggithelp wanted

倉庫指標

Star
 (74,848 star)
PR 合併指標
 (平均合併 11小時 43分鐘) (30 天內合併 1,000 個 PR)

描述

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

  • VS Code Version: 1.86.1 (system setup)
  • OS Version: Windows 11 (Windows_NT x64 10.0.22631)

Steps to Reproduce:

  1. Open a folder that has a git submodule (git clone https://github.com/mayraamaral/submodule-father --recursive)
  2. In the submodule, checkout to a different commit (cd submodule-father/submodule-child && git checkout 5e40a1b or edit a file in the submodule)
  3. Open the project in VS Code
  4. Open the Source Control sidebar
  5. Close the submodule-child submodule (Right Click > Close Repository)
  6. Click the "Discard Changes" or "Stage Changes" button and the expected outcome doesn't happen

Screenshot of the broken buttons: screenshot of the broken buttons

I can replicate the issue in my normal installation with all extensions disabled. On the latest insiders build, mostly not customized, I don't see the issue. I don't see any non-default settings that would be causing this.

貢獻者指南