fix: log rig discovery errors instead of silently swallowing (gt-rsnj9)

- DiscoverRigs() now logs failed rig loads to stderr instead of silently
  continuing
- AddRig warnings now output to stderr instead of stdout, matching the
  codebase convention for non-fatal warnings
- Added clarifying comment for best-effort git ref update in worktree

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
chrome
2026-01-05 00:18:01 -08:00
committed by Steve Yegge
parent 18578b3030
commit 168e805d0c
2 changed files with 7 additions and 5 deletions

View File

@@ -853,7 +853,8 @@ func (g *Git) BranchPushedToRemote(localBranch, remote string) (bool, int, error
// See: gt-cehl8 (gt done fails in worktrees due to missing origin tracking ref)
remoteRef := "refs/remotes/" + remoteBranch
if _, err := g.run("rev-parse", "--verify", remoteRef); err != nil {
// Remote ref doesn't exist locally - update it from FETCH_HEAD if fetch succeeded
// Remote ref doesn't exist locally - update it from FETCH_HEAD if fetch succeeded.
// Best-effort: if this fails, the code below falls back to ls-remote.
if fetchErr == nil {
_, _ = g.run("update-ref", remoteRef, "FETCH_HEAD")
}