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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user