Skip to content

Commit 095f077

Browse files
committed
ci: Do not print git log for empty COMMIT_RANGE
1 parent 77a2f5d commit 095f077

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

ci/lint/06_script.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ export LC_ALL=C
88

99
GIT_HEAD=$(git rev-parse HEAD)
1010
if [ -n "$CIRRUS_PR" ]; then
11-
COMMIT_RANGE="$CIRRUS_BASE_SHA..$GIT_HEAD"
12-
test/lint/commit-script-check.sh $COMMIT_RANGE
11+
COMMIT_RANGE="${CIRRUS_BASE_SHA}..$GIT_HEAD"
12+
test/lint/commit-script-check.sh "$COMMIT_RANGE"
1313
fi
1414
export COMMIT_RANGE
1515

@@ -34,5 +34,7 @@ if [ "$CIRRUS_REPO_FULL_NAME" = "bitcoin/bitcoin" ] && [ "$CIRRUS_PR" = "" ] ; t
3434
./contrib/verify-commits/verify-commits.py;
3535
fi
3636

37-
echo
38-
git log --no-merges --oneline $COMMIT_RANGE
37+
if [ -n "$COMMIT_RANGE" ]; then
38+
echo
39+
git log --no-merges --oneline "$COMMIT_RANGE"
40+
fi

0 commit comments

Comments
 (0)