beads/internal/syncbranch
Steve Yegge 994512654c fix: prevent sync.branch from being set to main/master (#807)
Two issues fixed:
1. `bd init` was auto-detecting current branch (e.g., main) as sync.branch
   when no --branch flag was specified. This caused worktree conflicts.
2. Added validation to reject main/master as sync.branch values.

When sync.branch is set to main, the worktree mechanism creates a checkout
of main at .git/beads-worktrees/main/, which prevents git checkout main
from working in the user's working directory.

The sync branch feature should use a dedicated branch like 'beads-sync'.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Executed-By: beads/crew/dave
Rig: beads
Role: crew
2025-12-30 16:45:51 -08:00
..
syncbranch.go fix: prevent sync.branch from being set to main/master (#807) 2025-12-30 16:45:51 -08:00
syncbranch_test.go fix: prevent sync.branch from being set to main/master (#807) 2025-12-30 16:45:51 -08:00
worktree.go fix: edge case in normalizeBeadsRelPath for similar prefixes 2025-12-29 15:51:17 -08:00
worktree_divergence_test.go fix: use content-level merge for divergence recovery (bd-kpy) 2025-12-24 22:41:40 -08:00
worktree_helpers_test.go bd sync: 2025-12-23 23:38:57 2025-12-24 00:06:41 -08:00
worktree_path_test.go fix: edge case in normalizeBeadsRelPath for similar prefixes 2025-12-29 15:51:17 -08:00
worktree_sync_test.go refactor: Remove deprecated fetchAndRebaseInWorktree (bd-kkka) 2025-12-28 16:40:26 -08:00