diff options
-rw-r--r-- | round-robin.sh | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/round-robin.sh b/round-robin.sh index 8227d38e..1512ca0e 100644 --- a/round-robin.sh +++ b/round-robin.sh @@ -372,23 +372,24 @@ update_baseline () # the current one, but keep entries for results that are better # (so that we have a record of pending regressions). while no_regression_p; do + prev_head="" if git -C base-artifacts rev-parse HEAD^ >/dev/null 2>&1; then - prev_head=$(git -C base-artifacts rev-parse HEAD) + # For every regression we want to keep artifacts for the first-bad + # build, so reset to the most relevant regression (marked by reset-baseline). + if [ -f base-artifacts/reset-baseline ] && ! ${rr[reset_baseline]}; then + prev_head=$(git -C base-artifacts rev-parse HEAD) + fi git -C base-artifacts reset --hard HEAD^ else # We got to the beginning of git history, so amend the current # commit. The initial state of baseline is "empty" branch, # which we treat as worst possible in no_regression_p(). amend="--amend" - prev_head="" break fi done - # For every regression we want to keep artifacts for the first-bad - # build, so discard one less than needed. - if [ x"$prev_head" != x"" -a -f base-artifacts/reset-baseline ] \ - && ! ${rr[reset_baseline]}; then + if [ x"$prev_head" != x"" ]; then git -C base-artifacts reset --hard $prev_head fi |