Skip to content

Sessions - add noTrack option to worktree creation and adopt new option#308471

Merged
lszomoru merged 1 commit intomainfrom
lszomoru/provincial-swordtail
Apr 8, 2026
Merged

Sessions - add noTrack option to worktree creation and adopt new option#308471
lszomoru merged 1 commit intomainfrom
lszomoru/provincial-swordtail

Conversation

@lszomoru
Copy link
Copy Markdown
Member

@lszomoru lszomoru commented Apr 8, 2026

Fixes #308465

Copilot AI review requested due to automatic review settings April 8, 2026 09:39
@lszomoru lszomoru enabled auto-merge (squash) April 8, 2026 09:39
@lszomoru lszomoru self-assigned this Apr 8, 2026
@lszomoru lszomoru added this to the 1.116.0 milestone Apr 8, 2026
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 extends the Git extension’s worktree creation plumbing to support a noTrack option (mapped to git worktree add --no-track) and adopts that option in Copilot Sessions worktree creation to avoid configuring upstream tracking for the created branch.

Changes:

  • Add an optional noTrack?: boolean to Repository.createWorktree(...) and wire it through to the underlying git worktree add invocation.
  • Update the Git extension API typings and API wrapper to expose the new option.
  • Update Copilot’s git service abstractions/mocks and set noTrack: true when creating session worktrees.
Show a summary per file
File Description
extensions/git/src/repository.ts Thread noTrack through Repository.createWorktree into the underlying git repository implementation.
extensions/git/src/git.ts Add support for --no-track in worktree add argument construction.
extensions/git/src/api/git.d.ts Expose the new noTrack option on the Git extension’s public createWorktree API typing.
extensions/git/src/api/api1.ts Keep the API wrapper signature in sync with the updated createWorktree options.
extensions/copilot/src/platform/test/node/simulationWorkspaceServices.ts Update test service interface typing to include noTrack.
extensions/copilot/src/platform/ignore/node/test/mockGitService.ts Update mock git service typing to include noTrack.
extensions/copilot/src/platform/git/vscode/git.d.ts Update Copilot’s vendored Git API typing to include noTrack.
extensions/copilot/src/platform/git/vscode-node/gitServiceImpl.ts Update createWorktree signature to accept and forward noTrack.
extensions/copilot/src/platform/git/common/gitService.ts Update IGitService.createWorktree options typing to include noTrack.
extensions/copilot/src/extension/chatSessions/vscode-node/chatSessionWorktreeServiceImpl.ts Adopt noTrack: true for Copilot session worktree creation.

Copilot's findings

  • Files reviewed: 8/10 changed files
  • Comments generated: 0

@lszomoru lszomoru merged commit 147c606 into main Apr 8, 2026
27 checks passed
@lszomoru lszomoru deleted the lszomoru/provincial-swordtail branch April 8, 2026 10:58
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.

Sessions - new worktree is created with main as its upstream

3 participants