From 5a2976b5004b1e947132aba220ddb9f9796441a5 Mon Sep 17 00:00:00 2001 From: matt wilkie Date: Sun, 21 Dec 2025 12:13:39 -0700 Subject: [PATCH] fix: remove unused channels in timeout message helpers The timerChan and timeoutChan variables were created but never read from, causing lint errors. Removed them since we don't need channel synchronization - we only want the timeout to trigger a message, not block anything. --- cmd/bd/sync.go | 2 -- internal/syncbranch/worktree.go | 2 -- 2 files changed, 4 deletions(-) diff --git a/cmd/bd/sync.go b/cmd/bd/sync.go index 7d72ec2a..5e31ea19 100644 --- a/cmd/bd/sync.go +++ b/cmd/bd/sync.go @@ -2157,12 +2157,10 @@ func checkOrphanedChildrenInJSONL(jsonlPath string) (*OrphanedChildren, error) { // This helps when git operations hang waiting for credential/browser auth. func runGitCmdWithTimeoutMsg(ctx context.Context, cmd *exec.Cmd, cmdName string, timeoutDelay time.Duration) ([]byte, error) { // Start a timer to print a message if the command takes too long - timeoutChan := make(chan struct{}, 1) go func() { select { case <-time.After(timeoutDelay): fmt.Fprintf(os.Stderr, "⏳ %s is taking longer than expected (possibly waiting for authentication). If this hangs, check for a browser auth prompt or run 'git status' in another terminal.\n", cmdName) - timeoutChan <- struct{}{} case <-ctx.Done(): // Context cancelled, don't print message } diff --git a/internal/syncbranch/worktree.go b/internal/syncbranch/worktree.go index 455c5193..2979e2b8 100644 --- a/internal/syncbranch/worktree.go +++ b/internal/syncbranch/worktree.go @@ -786,12 +786,10 @@ func fetchAndRebaseInWorktree(ctx context.Context, worktreePath, branch, remote // Returns: combined output and error from the command func runCmdWithTimeoutMessage(ctx context.Context, timeoutMsg string, timeoutDelay time.Duration, cmd *exec.Cmd) ([]byte, error) { // Start a timer to print a message if the command takes too long - timerChan := make(chan struct{}, 1) go func() { select { case <-time.After(timeoutDelay): fmt.Fprintf(os.Stderr, "⏳ %s\n", timeoutMsg) - timerChan <- struct{}{} case <-ctx.Done(): // Context cancelled, don't print message }