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:
committed by
Steve Yegge
parent
b3ebedb063
commit
a1079fcbe1
@@ -9,6 +9,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/steveyegge/beads/internal/merge"
|
"github.com/steveyegge/beads/internal/merge"
|
||||||
|
"github.com/steveyegge/beads/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
// WorktreeManager handles git worktree lifecycle for separate beads branches
|
// WorktreeManager handles git worktree lifecycle for separate beads branches
|
||||||
@@ -360,7 +361,8 @@ func (wm *WorktreeManager) isValidWorktree(worktreePath string) (bool, error) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if absPath == absWorktreePath {
|
// Use PathsEqual to handle case-insensitive filesystems (macOS/Windows)
|
||||||
|
if utils.PathsEqual(absPath, absWorktreePath) {
|
||||||
return true, nil
|
return true, nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user