When sync.branch is configured to the same branch as the current branch, git worktree creation fails because the same branch cannot be checked out in multiple locations. This fix detects when sync.branch equals the current branch and falls back to direct commits on the current branch instead of using the worktree-based approach. Changes: - Add IsSyncBranchSameAsCurrent() helper in syncbranch package - Add GetCurrentBranch() helper function - Update sync.go to detect this case and skip worktree operations - Add unit tests for the new functionality Closes #519 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
72 KiB
72 KiB