You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After the latest update, when I look at the Source Control Repository view, the branch name for repos that are worktrees is wrong - it shows the name of the main git repo.
To reproduce:
Checkout a git repo to branch A
Create a git worktree for branch B and add folder to VSCode
Go to Source Control Repository view
Result both repos show branch A.
VS Code version: Code 1.73.0 (Universal) (8fa188b, 2022-11-01T15:38:50.881Z)
OS version: Darwin arm64 22.2.0
Modes:
Sandboxed: No
The text was updated successfully, but these errors were encountered:
I can confirm the bug after upgrading to the latest release.
I also think it's more than just a visual bug since when I try to commit a change on a worktree branch (different from the default branch) using the Source Control Repository view and with git.branchProtectionPrompt set to alwaysPrompt, I get prompted as if I was about to commit on my default branch (protected), even though a git branch in the terminal confirms I am not on my default branch.
Steps to reproduce: (via Windows cmd - not sure if we see the same problem in other OS)
mkdir test
cd test
git init
echo test >test
git add test
git commit -m "test-commit in master branch"
git worktree add ../bla -b bla
This will create a new repository in a directory called "test", then adds a dummy commit into the master branch and finally creates a worktree directory in the directory "bla" alongside "test" where it checks out a new branch "bla". When opening the folder "bla" in VS Code you will see "master" as the checked out branch (which is actually checked out in "test").
Type: Bug
After the latest update, when I look at the
Source Control Repository
view, the branch name for repos that are worktrees is wrong - it shows the name of the main git repo.To reproduce:
Source Control Repository
viewVS Code version: Code 1.73.0 (Universal) (8fa188b, 2022-11-01T15:38:50.881Z)
OS version: Darwin arm64 22.2.0
Modes:
Sandboxed: No
The text was updated successfully, but these errors were encountered: