diff options
author | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-01-04 13:56:41 +0100 |
---|---|---|
committer | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-01-04 13:56:45 +0100 |
commit | bf3b589413568b12b130af66e134f6670d3026ac (patch) | |
tree | 2d2833df84c4893f222f5bdd3b6f98040ff3fea3 /ci/lint | |
parent | 4bb840a453118360c0d91e9d191c4821b841de20 (diff) | |
parent | fa5cbf2290dab08296cabbd973e9adefc883f3fc (diff) | |
download | bitcoin-bf3b589413568b12b130af66e134f6670d3026ac.tar.xz |
Merge bitcoin/bitcoin#26791: ci: Properly set COMMIT_RANGE in lint task
fa5cbf2290dab08296cabbd973e9adefc883f3fc ci: Properly set COMMIT_RANGE in lint task (MarcoFalke)
Pull request description:
Currently the variable holds (apart from the commits in the pull request) all commits to master since the pull was opened.
This is problematic, because already merged commits are linted in unrelated pulls, leading to:
* Wasted resources. For example, currently the lint task may take 9 minutes, when it should take 1. See https://cirrus-ci.com/task/6032782770569216?logs=lint#L1449
* False failures. For example, when a "wrong" commit is in master it can lead to some pulls failing unrelatedly, and others not.
Now that the CI has the `/merge` commit (since commit fad7281d7842f337932cf44e703fdd631230ddd6), `COMMIT_RANGE` can simply be set to `HEAD~..HEAD` to only hold the changes in the pull.
ACKs for top commit:
fanquake:
ACK fa5cbf2290dab08296cabbd973e9adefc883f3fc
Tree-SHA512: e85fca4ca9d2615ddd2544403485e06885769a3f70bca297e23eefda2a1d28f47c5271f6adfa6ce0e5e972335c78098b76e0db4b109f59d0986bf508cef7528f
Diffstat (limited to 'ci/lint')
-rwxr-xr-x | ci/lint/06_script.sh | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ci/lint/06_script.sh b/ci/lint/06_script.sh index a1721a703f..c14d7473d3 100755 --- a/ci/lint/06_script.sh +++ b/ci/lint/06_script.sh @@ -6,9 +6,8 @@ export LC_ALL=C -GIT_HEAD=$(git rev-parse HEAD) if [ -n "$CIRRUS_PR" ]; then - COMMIT_RANGE="${CIRRUS_BASE_SHA}..$GIT_HEAD" + COMMIT_RANGE="HEAD~..HEAD" echo git log --no-merges --oneline "$COMMIT_RANGE" echo |