fix: show "No changes to commit" when sync-branch worktree has no changes

Follow-up to #812 fix. When useSyncBranch is true, we always call
CommitToSyncBranch (bypassing gitHasBeadsChanges). If the worktree
has no actual changes, we now show "→ No changes to commit" for
consistent UX with the non-sync-branch code path.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-30 18:20:21 -08:00
parent 202a617bb5
commit 2e55f2838a

View File

@@ -518,6 +518,10 @@ Use --merge to merge the sync branch back to main branch.`,
fmt.Printf("✓ Pushed %s to remote\n", syncBranchName)
pushedViaSyncBranch = true
}
} else {
// GH#812: When useSyncBranch is true, we always attempt commit
// (bypassing gitHasBeadsChanges). Report when worktree has no changes.
fmt.Println("→ No changes to commit")
}
} else {
// Regular commit to current branch