Skip to content

Background - improve worktree changes calculation#2685

Merged
lszomoru merged 3 commits into
mainfrom
lszomoru/planned-alpaca
Dec 27, 2025
Merged

Background - improve worktree changes calculation#2685
lszomoru merged 3 commits into
mainfrom
lszomoru/planned-alpaca

Conversation

@lszomoru
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings December 27, 2025 17:36
@lszomoru lszomoru enabled auto-merge December 27, 2025 17:36
@lszomoru lszomoru self-assigned this Dec 27, 2025
@vs-code-engineering vs-code-engineering Bot added this to the December / January 2026 milestone Dec 27, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves worktree changes calculation by adding worktree information to the git repository context. The key improvement is that the system can now check whether a worktree belongs to any discovered repositories before attempting to open it, making the worktree discovery process more efficient.

  • Added Worktree type definition and integrated it into RepositoryState and RepoContext
  • Enhanced getWorktreeChanges to validate worktree membership before repository operations
  • Added explicit worktree repository opening step with clear documentation

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/platform/git/vscode/git.d.ts Added Worktree interface and included it in RepositoryState
src/platform/git/common/gitService.ts Added worktrees property to RepoContext interface and imported Worktree type
src/platform/git/vscode/gitServiceImpl.ts Exposed worktrees from repository state in RepoContextImpl
src/platform/test/node/simulationWorkspaceServices.ts Added empty worktrees array to test repository context
src/extension/chatSessions/vscode-node/chatSessionWorktreeServiceImpl.ts Improved worktree change calculation flow with validation and explicit repository opening

@lszomoru lszomoru added this pull request to the merge queue Dec 27, 2025
Merged via the queue into main with commit e100c2b Dec 27, 2025
19 checks passed
@lszomoru lszomoru deleted the lszomoru/planned-alpaca branch December 27, 2025 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants