From 8b7536149171ae1e075745d2a86d4d8cd26dedd3 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 10 Aug 2026 19:15:06 +0300 Subject: [PATCH 1/2] Temporarily downgrade Git to prevent fatal error --- .github/workflows/reusable-check-html-ids.yml | 7 +++++++ .github/workflows/reusable-context.yml | 9 +++++++++ .github/workflows/reusable-docs.yml | 8 ++++++++ 3 files changed, 24 insertions(+) diff --git a/.github/workflows/reusable-check-html-ids.yml b/.github/workflows/reusable-check-html-ids.yml index 41ba1288be1ecf4..0a9f6701dc3c8e1 100644 --- a/.github/workflows/reusable-check-html-ids.yml +++ b/.github/workflows/reusable-check-html-ids.yml @@ -20,6 +20,13 @@ jobs: with: persist-credentials: false ref: ${{ github.event.pull_request.head.sha }} + - name: 'Downgrade Git' + # Temporarily downgrade to 2.43 until 2.55 is in the runner image, + # to avoid "fatal: shallow file has changed since we read it" bug. + # See https://github.com/python/cpython/issues/151365. + run: | + sudo apt-get install -y --allow-downgrades git/noble-updates git-man/noble-updates + git --version - name: 'Find merge base' id: merge-base run: | diff --git a/.github/workflows/reusable-context.yml b/.github/workflows/reusable-context.yml index c998cbff181dd12..4dfcef79b77c11d 100644 --- a/.github/workflows/reusable-context.yml +++ b/.github/workflows/reusable-context.yml @@ -90,6 +90,15 @@ jobs: || '' }} + - name: 'Downgrade Git' + # Temporarily downgrade to 2.43 until 2.55 is in the runner image, + # to avoid "fatal: shallow file has changed since we read it" bug. + # See https://github.com/python/cpython/issues/151365. + if: github.event_name == 'pull_request' + run: | + sudo apt-get install -y --allow-downgrades git/noble-updates git-man/noble-updates + git --version + # Adapted from https://github.com/actions/checkout/issues/520#issuecomment-1167205721 - name: Fetch commits to get branch diff if: github.event_name == 'pull_request' diff --git a/.github/workflows/reusable-docs.yml b/.github/workflows/reusable-docs.yml index 199e0fd8d181f0b..b89237b5add323e 100644 --- a/.github/workflows/reusable-docs.yml +++ b/.github/workflows/reusable-docs.yml @@ -47,6 +47,14 @@ jobs: && github.event.pull_request.head.sha || '' }} + - name: 'Downgrade Git' + # Temporarily downgrade to 2.43 until 2.55 is in the runner image, + # to avoid "fatal: shallow file has changed since we read it" bug. + # See https://github.com/python/cpython/issues/151365. + if: github.event_name == 'pull_request' + run: | + sudo apt-get install -y --allow-downgrades git/noble-updates git-man/noble-updates + git --version # Adapted from https://github.com/actions/checkout/issues/520#issuecomment-1167205721 - name: 'Fetch commits to get branch diff' if: github.event_name == 'pull_request' From 0fb22138fe3cb2aeb5685aec4a0d1ba406beaacb Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 10 Aug 2026 19:41:37 +0300 Subject: [PATCH 2/2] Pin to 2.43.* --- .github/workflows/reusable-check-html-ids.yml | 2 +- .github/workflows/reusable-context.yml | 2 +- .github/workflows/reusable-docs.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable-check-html-ids.yml b/.github/workflows/reusable-check-html-ids.yml index 0a9f6701dc3c8e1..bdebacc9eed06bc 100644 --- a/.github/workflows/reusable-check-html-ids.yml +++ b/.github/workflows/reusable-check-html-ids.yml @@ -25,7 +25,7 @@ jobs: # to avoid "fatal: shallow file has changed since we read it" bug. # See https://github.com/python/cpython/issues/151365. run: | - sudo apt-get install -y --allow-downgrades git/noble-updates git-man/noble-updates + sudo apt-get install -y --allow-downgrades 'git=1:2.43.*' 'git-man=1:2.43.*' git --version - name: 'Find merge base' id: merge-base diff --git a/.github/workflows/reusable-context.yml b/.github/workflows/reusable-context.yml index 4dfcef79b77c11d..f307326bae41209 100644 --- a/.github/workflows/reusable-context.yml +++ b/.github/workflows/reusable-context.yml @@ -96,7 +96,7 @@ jobs: # See https://github.com/python/cpython/issues/151365. if: github.event_name == 'pull_request' run: | - sudo apt-get install -y --allow-downgrades git/noble-updates git-man/noble-updates + sudo apt-get install -y --allow-downgrades 'git=1:2.43.*' 'git-man=1:2.43.*' git --version # Adapted from https://github.com/actions/checkout/issues/520#issuecomment-1167205721 diff --git a/.github/workflows/reusable-docs.yml b/.github/workflows/reusable-docs.yml index b89237b5add323e..6b1a9076c8251b0 100644 --- a/.github/workflows/reusable-docs.yml +++ b/.github/workflows/reusable-docs.yml @@ -53,7 +53,7 @@ jobs: # See https://github.com/python/cpython/issues/151365. if: github.event_name == 'pull_request' run: | - sudo apt-get install -y --allow-downgrades git/noble-updates git-man/noble-updates + sudo apt-get install -y --allow-downgrades 'git=1:2.43.*' 'git-man=1:2.43.*' git --version # Adapted from https://github.com/actions/checkout/issues/520#issuecomment-1167205721 - name: 'Fetch commits to get branch diff'