From 398f699866a6b1af5a0a0d68d0dad10c537d2600 Mon Sep 17 00:00:00 2001 From: Sun Serega Date: Sat, 31 Aug 2024 17:05:27 +0200 Subject: [PATCH] +21 --- .github/workflows/upstream pretest.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/upstream pretest.yaml b/.github/workflows/upstream pretest.yaml index 2dfdf7ef..2cb23e17 100644 --- a/.github/workflows/upstream pretest.yaml +++ b/.github/workflows/upstream pretest.yaml @@ -432,6 +432,7 @@ jobs: git checkout $b_core_subm_pretest if (-not $?) { throw "git checkout failed" } + $need_force_push = $false Write-Host "--- Deleting the latest [trivial] commits:" while ($true) { ($commit_name = (git log -1 --pretty=format:"%B" HEAD) -join "`n") @@ -440,6 +441,11 @@ jobs: Write-Host "=====" git reset --hard HEAD~1 if (-not $?) { throw "git reset failed" } + $need_force_push = $true + } + if ($need_force_push) { + git push -f + if (-not $?) { throw "git push -f failed" } } # expecting fast-forward when possible