fix(git): use case-insensitive path comparison for worktree validation (GH#880)

On macOS with case-insensitive filesystem, path casing differences between
the daemon socket path and git worktree registry caused sync failures.

Changed isValidWorktree() to use utils.PathsEqual() which handles
case-insensitivity on macOS/Windows, matching the fix already applied
to daemon registry in GH#869.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
beads/crew/emma
2026-01-04 16:11:20 -08:00
committed by Steve Yegge
parent b3ebedb063
commit a1079fcbe1

View File

@@ -9,6 +9,7 @@ import (
"strings"
"github.com/steveyegge/beads/internal/merge"
"github.com/steveyegge/beads/internal/utils"
)
// WorktreeManager handles git worktree lifecycle for separate beads branches
@@ -360,7 +361,8 @@ func (wm *WorktreeManager) isValidWorktree(worktreePath string) (bool, error) {
continue
}
}
if absPath == absWorktreePath {
// Use PathsEqual to handle case-insensitive filesystems (macOS/Windows)
if utils.PathsEqual(absPath, absWorktreePath) {
return true, nil
}
}