aboutsummaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-11-07 17:04:06 +0200
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-11-07 17:04:06 +0200
commit095f07744cf500adc1f1587eb5b7a61df6e6b05f (patch)
treeeb5232eafc8dbd17bf9a524c55f720f513e62257 /ci
parent77a2f5d30c5ecb764b8a7c098492e1f5cdec90f0 (diff)
downloadbitcoin-095f07744cf500adc1f1587eb5b7a61df6e6b05f.tar.xz
ci: Do not print `git log` for empty COMMIT_RANGE
Diffstat (limited to 'ci')
-rwxr-xr-xci/lint/06_script.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/ci/lint/06_script.sh b/ci/lint/06_script.sh
index f7dacd8512..11dda51d2d 100755
--- a/ci/lint/06_script.sh
+++ b/ci/lint/06_script.sh
@@ -8,8 +8,8 @@ export LC_ALL=C
GIT_HEAD=$(git rev-parse HEAD)
if [ -n "$CIRRUS_PR" ]; then
- COMMIT_RANGE="$CIRRUS_BASE_SHA..$GIT_HEAD"
- test/lint/commit-script-check.sh $COMMIT_RANGE
+ COMMIT_RANGE="${CIRRUS_BASE_SHA}..$GIT_HEAD"
+ test/lint/commit-script-check.sh "$COMMIT_RANGE"
fi
export COMMIT_RANGE
@@ -34,5 +34,7 @@ if [ "$CIRRUS_REPO_FULL_NAME" = "bitcoin/bitcoin" ] && [ "$CIRRUS_PR" = "" ] ; t
./contrib/verify-commits/verify-commits.py;
fi
-echo
-git log --no-merges --oneline $COMMIT_RANGE
+if [ -n "$COMMIT_RANGE" ]; then
+ echo
+ git log --no-merges --oneline "$COMMIT_RANGE"
+fi