File tree Expand file tree Collapse file tree
.github/scripts/flaky-test-fix Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -248,11 +248,12 @@ PROGRESS_DIR="$OUT_DIR/progress-checkout"
248248rm -rf " $PROGRESS_DIR "
249249echo " ==> Recording $CLASS .$METHOD on $PROGRESS_BRANCH "
250250git fetch " $REMOTE " " $PROGRESS_BRANCH " --quiet
251- git worktree add --quiet --detach " $PROGRESS_DIR " " $REMOTE /$PROGRESS_BRANCH "
251+ # Force-reset any stale local branch to match remote; otherwise a previous
252+ # local copy can diverge and cause non-fast-forward on push.
253+ git branch -f " $PROGRESS_BRANCH " " $REMOTE /$PROGRESS_BRANCH "
254+ git worktree add --quiet " $PROGRESS_DIR " " $PROGRESS_BRANCH "
252255(
253256 cd " $PROGRESS_DIR "
254- git switch -c " $PROGRESS_BRANCH " > /dev/null 2>&1 || \
255- git switch " $PROGRESS_BRANCH " > /dev/null 2>&1
256257 printf ' %s.%s\n' " $CLASS " " $METHOD " >> attempted.txt
257258 git add attempted.txt
258259 git commit -q -m " Mark $CLASS .$METHOD as attempted"
You can’t perform that action at this time.
0 commit comments