fix(bugseti): handle silent git fetch failure in submit.go

Capture and log the error from `git fetch origin` in createBranch()
instead of silently ignoring it. Warns the user they may be proceeding
with stale data if the fetch fails.

Fixes #62

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Athena 2026-02-10 15:30:50 +00:00 committed by Snider
parent bee56c3fe1
commit b698faf8d5

View file

@ -177,7 +177,9 @@ func (s *SubmitService) createBranch(workDir, branch string) error {
// Fetch latest from upstream
cmd := exec.CommandContext(ctx, "git", "fetch", "origin")
cmd.Dir = workDir
cmd.Run() // Ignore errors
if err := cmd.Run(); err != nil {
log.Printf("WARNING: git fetch origin failed in %s: %v (proceeding with potentially stale data)", workDir, err)
}
// Create and checkout new branch
cmd = exec.CommandContext(ctx, "git", "checkout", "-b", branch)