Skip to content

fix(worktree): use main repo root for worktree naming - #156

Merged
camwest merged 1 commit into
masterfrom
claude/fix-worktree-naming-b9a2E
Feb 5, 2026
Merged

fix(worktree): use main repo root for worktree naming#156
camwest merged 1 commit into
masterfrom
claude/fix-worktree-naming-b9a2E

Conversation

@camwest

@camwest camwest commented Feb 5, 2026

Copy link
Copy Markdown
Owner

When isq start was run from within an existing worktree,
repo.workdir() returned the current worktree's path instead of the
main repo root. This caused new worktree names to append to the current
worktree name, producing absurdly long paths like
wrk-537-chat-goes-off-rails-and-page-404-WRK-536-investigate-....

Fix by using repo.common_dir() (which always resolves to the main
repo's .git directory) to derive the repo name and parent, consistent
with what detect_repo_path() already does.

https://claude.ai/code/session_01A59eHjgbg2LRBLysFD3Cmp

When `isq start` was run from within an existing worktree,
`repo.workdir()` returned the current worktree's path instead of the
main repo root. This caused new worktree names to append to the current
worktree name, producing absurdly long paths like
`wrk-537-chat-goes-off-rails-and-page-404-WRK-536-investigate-...`.

Fix by using `repo.common_dir()` (which always resolves to the main
repo's .git directory) to derive the repo name and parent, consistent
with what `detect_repo_path()` already does.

https://claude.ai/code/session_01A59eHjgbg2LRBLysFD3Cmp
@camwest
camwest merged commit 2dc153c into master Feb 5, 2026
2 checks passed
@camwest
camwest deleted the claude/fix-worktree-naming-b9a2E branch February 5, 2026 17:55
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.

2 participants