From a1079fcbe13aad6dfa90d026e3101c6dc3e4cb2f Mon Sep 17 00:00:00 2001 From: beads/crew/emma Date: Sun, 4 Jan 2026 16:11:20 -0800 Subject: [PATCH] fix(git): use case-insensitive path comparison for worktree validation (GH#880) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- internal/git/worktree.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/git/worktree.go b/internal/git/worktree.go index e5621272..8fd20fd6 100644 --- a/internal/git/worktree.go +++ b/internal/git/worktree.go @@ -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 } }