File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -318,7 +318,7 @@ runs:
318318 max_attempts=5
319319 attempt=1
320320 while true; do
321- if git push --force-with-lease=coverage origin HEAD:coverage; then
321+ if git push origin HEAD:coverage; then
322322 break
323323 fi
324324
@@ -327,8 +327,14 @@ runs:
327327 exit 1
328328 fi
329329
330- echo "Push rejected (attempt ${attempt}/${max_attempts}). Refreshing coverage branch..."
331- git fetch origin coverage
330+ echo "Push rejected (attempt ${attempt}/${max_attempts}). Rebasing onto latest origin/coverage..."
331+ git fetch origin +refs/heads/coverage:refs/remotes/origin/coverage
332+ # Prefer this run's regenerated files if both runs touched the same paths.
333+ if ! git rebase -X theirs refs/remotes/origin/coverage; then
334+ git rebase --abort || true
335+ echo "Automatic rebase failed due to conflicts in coverage branch updates." >&2
336+ exit 1
337+ fi
332338 attempt=$(( attempt + 1 ))
333339 done
334340 else
You can’t perform that action at this time.
0 commit comments