aboutsummaryrefslogtreecommitdiff
path: root/ci/lint/06_script.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ci/lint/06_script.sh')
-rwxr-xr-xci/lint/06_script.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/ci/lint/06_script.sh b/ci/lint/06_script.sh
index c14d7473d3..fa28f6126c 100755
--- a/ci/lint/06_script.sh
+++ b/ci/lint/06_script.sh
@@ -6,7 +6,11 @@
export LC_ALL=C
-if [ -n "$CIRRUS_PR" ]; then
+if [ -n "$LOCAL_BRANCH" ]; then
+ # To faithfully recreate CI linting locally, specify all commits on the current
+ # branch.
+ COMMIT_RANGE="$(git merge-base HEAD master)..HEAD"
+elif [ -n "$CIRRUS_PR" ]; then
COMMIT_RANGE="HEAD~..HEAD"
echo
git log --no-merges --oneline "$COMMIT_RANGE"