Skip to content

Conversation

@lszomoru
Copy link
Member

@lszomoru lszomoru commented Jan 6, 2026

Fixes #286083

Copilot AI review requested due to automatic review settings January 6, 2026 20:08
@lszomoru lszomoru enabled auto-merge (squash) January 6, 2026 20:08
@lszomoru lszomoru self-assigned this Jan 6, 2026
@lszomoru lszomoru added the git GIT issues label Jan 6, 2026
@lszomoru lszomoru added this to the December 2025 milestone Jan 6, 2026
Copy link
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 fixes a bug where creating a worktree from within an existing worktree would incorrectly nest the new worktree path, creating unwanted .worktrees subdirectories. The fix ensures that when creating a worktree from another worktree, new worktrees are created as siblings in the same parent directory rather than being nested.

Key Changes:

  • Modified the default worktree path calculation to check if the current repository is a worktree
  • When creating from a worktree, new worktrees are now placed as siblings in the parent directory
  • When creating from a regular repository, the existing behavior of creating a .worktrees subdirectory is preserved

@lszomoru lszomoru merged commit b69e4fc into main Jan 6, 2026
27 of 28 checks passed
@lszomoru lszomoru deleted the lszomoru/circular-impala branch January 6, 2026 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

git GIT issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Creating a worktree from a worktree node nests worktree folders

3 participants