From 2e55f2838a0d7a011bcb571694d123ece418d667 Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Tue, 30 Dec 2025 18:20:21 -0800 Subject: [PATCH] fix: show "No changes to commit" when sync-branch worktree has no changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- cmd/bd/sync.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/bd/sync.go b/cmd/bd/sync.go index 85958de0..493cbbec 100644 --- a/cmd/bd/sync.go +++ b/cmd/bd/sync.go @@ -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