From 5f5067003a0bb8367a9d4cfe2542fece61b2d7c0 Mon Sep 17 00:00:00 2001 From: Paul Marquess Date: Sun, 15 Feb 2026 12:11:33 +0000 Subject: Take account of use-case where there is an empty git tree object when reading the BASE_SHA --- .github/workflows/lint.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 6d90aad439..3d1e3ad44a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,5 +13,7 @@ jobs: - name: Whitespace errors run: | + BASE_SHA="${{ github.event.pull_request.base.sha }}" + BASE_SHA="${BASE_SHA:-4b825dc642cb6eb9a060e54bf8d69288fbee4904}" git config core.whitespace blank-at-eol - git diff --color --check ${{ github.event.pull_request.base.sha }} -- './*' ':!*.patch' + git diff --color --check "$BASE_SHA" -- './*' ':!*.patch \ No newline at end of file -- cgit 0.0.5-2-1-g0f52