Implement git worktree management with sparse checkout (bd-a4b5)

- Created internal/git package with WorktreeManager
- Implements CreateBeadsWorktree with sparse checkout (.beads/ only)
- Implements RemoveBeadsWorktree with cleanup and pruning
- Implements CheckWorktreeHealth with repair capability
- Implements SyncJSONLToWorktree for JSONL syncing
- Comprehensive tests with 100% coverage
- Handles symlinks correctly (macOS /tmp -> /private/tmp)
- Idempotent worktree creation
- Sparse checkout excludes all files except .beads/
This commit is contained in:
Steve Yegge
2025-11-02 15:49:17 -08:00
parent 5aaa9ed8f5
commit c6bf6331ec
3 changed files with 882 additions and 0 deletions

File diff suppressed because one or more lines are too long