Merge pull request 'fix(bugseti): handle silent git fetch failure in submit.go' (#74) from Athena/core:fix/bugseti-git-fetch-error-62 into new
This commit is contained in:
commit
88e5560086
1 changed files with 3 additions and 1 deletions
|
|
@ -177,7 +177,9 @@ func (s *SubmitService) createBranch(workDir, branch string) error {
|
||||||
// Fetch latest from upstream
|
// Fetch latest from upstream
|
||||||
cmd := exec.CommandContext(ctx, "git", "fetch", "origin")
|
cmd := exec.CommandContext(ctx, "git", "fetch", "origin")
|
||||||
cmd.Dir = workDir
|
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
|
// Create and checkout new branch
|
||||||
cmd = exec.CommandContext(ctx, "git", "checkout", "-b", branch)
|
cmd = exec.CommandContext(ctx, "git", "checkout", "-b", branch)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue