fix: resolve_target fallback via git worktree list for external worktrees#128
fix: resolve_target fallback via git worktree list for external worktrees#128
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughAdds a last-resort lookup in Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
…rees Add a git worktree list --porcelain fallback as last resort in resolve_target() before returning "not found". This catches worktrees created outside the gtr-managed directory (e.g. via raw git worktree add) that the directory scan cannot find. Only runs when all fast-path checks fail, so zero performance impact on the happy path.
0736f04 to
d4cfdfa
Compare
Summary
git worktree list --porcelainfallback as the last step inresolve_target()before returning "not found"git worktree add /some/other/path -b feature) that the existing directory scan cannot findNote: Issue #127 was closed as already fixed by #123/#126 (
discover_repo_rootfix). This PR addresses a separate gap whereresolve_targetcouldn't find worktrees stored outside the gtr-managed worktrees directory.Test plan
git worktree add /tmp/ext -b ext-branch→git gtr go ext-branchsucceedsSummary by CodeRabbit