beads icon indicating copy to clipboard operation
beads copied to clipboard

fix(daemon): check sync-branch upstream for jj/jujutsu compatibility

Open phredrick42 opened this issue 3 months ago • 0 comments

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-push compatibility 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

phredrick42 avatar Jan 12 '26 12:01 phredrick42