beads
beads copied to clipboard
fix(daemon): check sync-branch upstream for jj/jujutsu compatibility
Summary
- When sync-branch is configured, daemon now checks that branch's upstream instead of current HEAD's upstream
- Adds
gitBranchHasUpstream(branch)to check a specific branch's upstream tracking, independent of HEAD state - Fixes
--auto-pushcompatibility with jj/jujutsu which always operates in detached HEAD mode
Test plan
- [x] Added unit tests for
gitBranchHasUpstream()covering:- Branch with upstream returns true
- Non-existent branch returns false
- Works with detached HEAD (jj scenario)
- Branch without upstream returns false
- [x] Manual E2E test: verified old daemon fails and new daemon succeeds with jj colocated repo in detached HEAD state
🤖 Generated with Claude Code