mhutchie / vscode-git-graph

View a Git Graph of your repository in Visual Studio Code, and easily perform Git actions from the graph.
https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph
Other
1.97k stars 260 forks source link

Nested git worktrees show up as Uncommitted Changes #790

Open XavierChanth opened 11 months ago

XavierChanth commented 11 months ago

Describe the Bug When you create a git worktree, it shows up as an uncommitted change.

Steps to Reproduce Steps to reproduce the behaviour:

  1. Open a repo in vscode
  2. Checkout branchA
  3. Create a nested worktree for branchB - git worktree add .wt/worktreeB branchB

Expected Behaviour Git Graph should locate worktrees and ignore them as changes.

Environment

Screenshots (optional) CleanShot 2023-11-07 at 11 33 40

Additional Context (optional) You could read from .git/worktrees/*/gitdir and drop the last path segment. (I can't think of a better way to do this)

⚠ Please make sure you complete all of the required sections of this template. Without this required information, it will be harder to replicate this bug, and cause additional delays in resolving it.