Title: GitHub Actions: Docs/Docs CI fails randomly with "fatal: shallow file has changed since we read it" error (git 2.54.0 regression) · Issue #151365 · python/cpython · GitHub
Open Graph Title: GitHub Actions: Docs/Docs CI fails randomly with "fatal: shallow file has changed since we read it" error (git 2.54.0 regression) · Issue #151365 · python/cpython
X Title: GitHub Actions: Docs/Docs CI fails randomly with "fatal: shallow file has changed since we read it" error (git 2.54.0 regression) · Issue #151365 · python/cpython
Description: Bug report git fetch origin "+4991c6a11cdf8273484e2c48cc83289caf769a56:remotes/origin/dataclass-eq-doc-update-3-13" --depth=12 --no-tags --prune --no-recurse-submodules failed with: From https://github.com/python/cpython * [new ref] 4991...
Open Graph Description: Bug report git fetch origin "+4991c6a11cdf8273484e2c48cc83289caf769a56:remotes/origin/dataclass-eq-doc-update-3-13" --depth=12 --no-tags --prune --no-recurse-submodules failed with: From https://gi...
X Description: Bug report git fetch origin "+4991c6a11cdf8273484e2c48cc83289caf769a56:remotes/origin/dataclass-eq-doc-update-3-13" --depth=12 --no-tags --prune --no-recurse-submodules failed with: From ...
Opengraph URL: https://github.com/python/cpython/issues/151365
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"GitHub Actions: Docs/Docs CI fails randomly with \"fatal: shallow file has changed since we read it\" error (git 2.54.0 regression)","articleBody":"# Bug report\n\n`git fetch origin \"+4991c6a11cdf8273484e2c48cc83289caf769a56:remotes/origin/dataclass-eq-doc-update-3-13\" --depth=12 --no-tags --prune --no-recurse-submodules` failed with:\n\n```\nFrom https://github.com/python/cpython\n * [new ref] 4991c6a11cdf8273484e2c48cc83289caf769a56 -\u003e origin/dataclass-eq-doc-update-3-13\nfatal: shallow file has changed since we read it\n```\n\nThis error occurs randomly for a few weeks.\n\nLogs: https://github.com/python/cpython/actions/runs/27361801697/job/80850919800?pr=139007\n\n\u003cdetails\u003e\n\n```\nCurrent runner version: '2.334.0'\n##[group]Runner Image Provisioner\nHosted Compute Agent\nVersion: 20260527.539\nCommit: a891dd388383b896fa6ac04a82c0b75cec981078\nBuild Date: 2026-05-27T21:39:57Z\nWorker ID: {39f265b4-c8d0-40ac-a926-535fc3decf7c}\nAzure Region: westus\n##[endgroup]\n##[group]Operating System\nUbuntu\n24.04.4\nLTS\n##[endgroup]\n##[group]Runner Image\nImage: ubuntu-24.04\nVersion: 20260607.184.1\nIncluded Software: https://github.com/actions/runner-images/blob/ubuntu24/20260607.184/images/ubuntu/Ubuntu2404-Readme.md\nImage Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20260607.184\n##[endgroup]\n##[group]GITHUB_TOKEN Permissions\nContents: read\nMetadata: read\n##[endgroup]\nSecret source: None\nPrepare workflow directory\nPrepare all required actions\nGetting action download info\nDownload action repository 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd' (SHA:de0fac2e4500dabe0009e67214ff5f5447ce83dd)\nDownload action repository 'actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405' (SHA:a309ff8b426b58ec0e2a45f0f869d46889d02405)\nDownload action repository 'actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f' (SHA:bbbca2ddaa5d8feaa63e36b76fdaad77386f024f)\nUses: python/cpython/.github/workflows/reusable-docs.yml@refs/pull/139007/merge (b76dbed1cbb8b37ccf2f90ba7cfeacdb9f4a0774)\nComplete job name: Docs / Docs\n##[group]Run actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd\nwith:\n persist-credentials: false\n ref: 4991c6a11cdf8273484e2c48cc83289caf769a56\n repository: python/cpython\n token: ***\n ssh-strict: true\n ssh-user: git\n clean: true\n sparse-checkout-cone-mode: true\n fetch-depth: 1\n fetch-tags: false\n show-progress: true\n lfs: false\n submodules: false\n set-safe-directory: true\nenv:\n FORCE_COLOR: 1\n branch_base: origin/main\n branch_pr: origin/dataclass-eq-doc-update-3-13\n commits: 11\n refspec_base: +6112d70abee2455bfa44a76a49a5a80472e21134:remotes/origin/main\n refspec_pr: +4991c6a11cdf8273484e2c48cc83289caf769a56:remotes/origin/dataclass-eq-doc-update-3-13\n##[endgroup]\nSyncing repository: python/cpython\n##[group]Getting Git version info\nWorking directory is '/home/runner/work/cpython/cpython'\n[command]/usr/bin/git version\ngit version 2.54.0\n##[endgroup]\nTemporarily overriding HOME='/home/runner/work/_temp/d63faf59-d6d5-483f-935f-f4988a4a68fb' before making global git config changes\nAdding repository directory to the temporary git global config as a safe directory\n[command]/usr/bin/git config --global --add safe.directory /home/runner/work/cpython/cpython\nDeleting the contents of '/home/runner/work/cpython/cpython'\n##[group]Initializing the repository\n[command]/usr/bin/git init /home/runner/work/cpython/cpython\nhint: Using 'master' as the name for the initial branch. This default branch name\nhint: will change to \"main\" in Git 3.0. To configure the initial branch name\nhint: to use in all of your new repositories, which will suppress this warning,\nhint: call:\nhint:\nhint: \tgit config --global init.defaultBranch \u003cname\u003e\nhint:\nhint: Names commonly chosen instead of 'master' are 'main', 'trunk' and\nhint: 'development'. The just-created branch can be renamed via this command:\nhint:\nhint: \tgit branch -m \u003cname\u003e\nhint:\nhint: Disable this message with \"git config set advice.defaultBranchName false\"\nInitialized empty Git repository in /home/runner/work/cpython/cpython/.git/\n[command]/usr/bin/git remote add origin https://github.com/python/cpython\n##[endgroup]\n##[group]Disabling automatic garbage collection\n[command]/usr/bin/git config --local gc.auto 0\n##[endgroup]\n##[group]Setting up auth\nRemoving SSH command configuration\n[command]/usr/bin/git config --local --name-only --get-regexp core\\.sshCommand\n[command]/usr/bin/git submodule foreach --recursive sh -c \"git config --local --name-only --get-regexp 'core\\.sshCommand' \u0026\u0026 git config --local --unset-all 'core.sshCommand' || :\"\nRemoving HTTP extra header\n[command]/usr/bin/git config --local --name-only --get-regexp http\\.https\\:\\/\\/github\\.com\\/\\.extraheader\n[command]/usr/bin/git submodule foreach --recursive sh -c \"git config --local --name-only --get-regexp 'http\\.https\\:\\/\\/github\\.com\\/\\.extraheader' \u0026\u0026 git config --local --unset-all 'http.https://github.com/.extraheader' || :\"\nRemoving includeIf entries pointing to credentials config files\n[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\\.gitdir:\n[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url\n[command]/usr/bin/git config --file /home/runner/work/_temp/git-credentials-3a72ad52-0885-4b0f-9f73-92d0f68a310b.config http.https://github.com/.extraheader AUTHORIZATION: basic ***\n[command]/usr/bin/git config --local includeIf.gitdir:/home/runner/work/cpython/cpython/.git.path /home/runner/work/_temp/git-credentials-3a72ad52-0885-4b0f-9f73-92d0f68a310b.config\n[command]/usr/bin/git config --local includeIf.gitdir:/home/runner/work/cpython/cpython/.git/worktrees/*.path /home/runner/work/_temp/git-credentials-3a72ad52-0885-4b0f-9f73-92d0f68a310b.config\n[command]/usr/bin/git config --local includeIf.gitdir:/github/workspace/.git.path /github/runner_temp/git-credentials-3a72ad52-0885-4b0f-9f73-92d0f68a310b.config\n[command]/usr/bin/git config --local includeIf.gitdir:/github/workspace/.git/worktrees/*.path /github/runner_temp/git-credentials-3a72ad52-0885-4b0f-9f73-92d0f68a310b.config\n##[endgroup]\n##[group]Fetching the repository\n[command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin 4991c6a11cdf8273484e2c48cc83289caf769a56\nFrom https://github.com/python/cpython\n * branch 4991c6a11cdf8273484e2c48cc83289caf769a56 -\u003e FETCH_HEAD\n[command]/usr/bin/git rev-parse --verify --quiet 4991c6a11cdf8273484e2c48cc83289caf769a56^{object}\n4991c6a11cdf8273484e2c48cc83289caf769a56\n##[endgroup]\n##[group]Determining the checkout info\n##[endgroup]\n[command]/usr/bin/git sparse-checkout disable\n[command]/usr/bin/git config --local --unset-all extensions.worktreeConfig\n##[group]Checking out the ref\n[command]/usr/bin/git checkout --progress --force 4991c6a11cdf8273484e2c48cc83289caf769a56\nNote: switching to '4991c6a11cdf8273484e2c48cc83289caf769a56'.\n\nYou are in 'detached HEAD' state. You can look around, make experimental\nchanges and commit them, and you can discard any commits you make in this\nstate without impacting any branches by switching back to a branch.\n\nIf you want to create a new branch to retain commits you create, you may\ndo so (now or later) by using -c with the switch command. Example:\n\n git switch -c \u003cnew-branch-name\u003e\n\nOr undo this operation with:\n\n git switch -\n\nTurn off this advice by setting config variable advice.detachedHead to false\n\nHEAD is now at 4991c6a Merge branch 'main' into dataclass-eq-doc-update-3-13\n##[endgroup]\n[command]/usr/bin/git log -1 --format=%H\n4991c6a11cdf8273484e2c48cc83289caf769a56\n##[group]Removing auth\nRemoving SSH command configuration\n[command]/usr/bin/git config --local --name-only --get-regexp core\\.sshCommand\n[command]/usr/bin/git submodule foreach --recursive sh -c \"git config --local --name-only --get-regexp 'core\\.sshCommand' \u0026\u0026 git config --local --unset-all 'core.sshCommand' || :\"\nRemoving HTTP extra header\n[command]/usr/bin/git config --local --name-only --get-regexp http\\.https\\:\\/\\/github\\.com\\/\\.extraheader\n[command]/usr/bin/git submodule foreach --recursive sh -c \"git config --local --name-only --get-regexp 'http\\.https\\:\\/\\/github\\.com\\/\\.extraheader' \u0026\u0026 git config --local --unset-all 'http.https://github.com/.extraheader' || :\"\nRemoving includeIf entries pointing to credentials config files\n[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\\.gitdir:\nincludeif.gitdir:/home/runner/work/cpython/cpython/.git.path\nincludeif.gitdir:/home/runner/work/cpython/cpython/.git/worktrees/*.path\nincludeif.gitdir:/github/workspace/.git.path\nincludeif.gitdir:/github/workspace/.git/worktrees/*.path\n[command]/usr/bin/git config --local --get-all includeif.gitdir:/home/runner/work/cpython/cpython/.git.path\n/home/runner/work/_temp/git-credentials-3a72ad52-0885-4b0f-9f73-92d0f68a310b.config\n[command]/usr/bin/git config --local --unset includeif.gitdir:/home/runner/work/cpython/cpython/.git.path /home/runner/work/_temp/git-credentials-3a72ad52-0885-4b0f-9f73-92d0f68a310b.config\n[command]/usr/bin/git config --local --get-all includeif.gitdir:/home/runner/work/cpython/cpython/.git/worktrees/*.path\n/home/runner/work/_temp/git-credentials-3a72ad52-0885-4b0f-9f73-92d0f68a310b.config\n[command]/usr/bin/git config --local --unset includeif.gitdir:/home/runner/work/cpython/cpython/.git/worktrees/*.path /home/runner/work/_temp/git-credentials-3a72ad52-0885-4b0f-9f73-92d0f68a310b.config\n[command]/usr/bin/git config --local --get-all includeif.gitdir:/github/workspace/.git.path\n/github/runner_temp/git-credentials-3a72ad52-0885-4b0f-9f73-92d0f68a310b.config\n[command]/usr/bin/git config --local --unset includeif.gitdir:/github/workspace/.git.path /github/runner_temp/git-credentials-3a72ad52-0885-4b0f-9f73-92d0f68a310b.config\n[command]/usr/bin/git config --local --get-all includeif.gitdir:/github/workspace/.git/worktrees/*.path\n/github/runner_temp/git-credentials-3a72ad52-0885-4b0f-9f73-92d0f68a310b.config\n[command]/usr/bin/git config --local --unset includeif.gitdir:/github/workspace/.git/worktrees/*.path /github/runner_temp/git-credentials-3a72ad52-0885-4b0f-9f73-92d0f68a310b.config\n[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url\nRemoving credentials config '/home/runner/work/_temp/git-credentials-3a72ad52-0885-4b0f-9f73-92d0f68a310b.config'\n##[endgroup]\n##[group]Run # Fetch enough history to find a common ancestor commit (aka merge-base):\n\u001B[36;1m# Fetch enough history to find a common ancestor commit (aka merge-base):\u001B[0m\n\u001B[36;1mgit fetch origin \"${refspec_pr}\" --depth=$(( commits + 1 )) \\\u001B[0m\n\u001B[36;1m --no-tags --prune --no-recurse-submodules\u001B[0m\n\u001B[36;1m\u001B[0m\n\u001B[36;1m# This should get the oldest commit in the local fetched history (which may not be the commit the PR branched from):\u001B[0m\n\u001B[36;1mCOMMON_ANCESTOR=$( git rev-list --first-parent --max-parents=0 --max-count=1 \"${branch_pr}\" )\u001B[0m\n\u001B[36;1mDATE=$( git log --date=iso8601 --format=%cd \"${COMMON_ANCESTOR}\" )\u001B[0m\n\u001B[36;1m\u001B[0m\n\u001B[36;1m# Get all commits since that commit date from the base branch (eg: master or main):\u001B[0m\n\u001B[36;1mgit fetch origin \"${refspec_base}\" --shallow-since=\"${DATE}\" \\\u001B[0m\n\u001B[36;1m --no-tags --prune --no-recurse-submodules\u001B[0m\nshell: /usr/bin/bash -e {0}\nenv:\n FORCE_COLOR: 1\n branch_base: origin/main\n branch_pr: origin/dataclass-eq-doc-update-3-13\n commits: 11\n refspec_base: +6112d70abee2455bfa44a76a49a5a80472e21134:remotes/origin/main\n refspec_pr: +4991c6a11cdf8273484e2c48cc83289caf769a56:remotes/origin/dataclass-eq-doc-update-3-13\n##[endgroup]\nFrom https://github.com/python/cpython\n * [new ref] 4991c6a11cdf8273484e2c48cc83289caf769a56 -\u003e origin/dataclass-eq-doc-update-3-13\nfatal: shallow file has changed since we read it\n##[error]Process completed with exit code 128.\nPost job cleanup.\n[command]/usr/bin/git version\ngit version 2.54.0\nTemporarily overriding HOME='/home/runner/work/_temp/4a1d09f5-9d14-4981-b20c-31cd66167f38' before making global git config changes\nAdding repository directory to the temporary git global config as a safe directory\n[command]/usr/bin/git config --global --add safe.directory /home/runner/work/cpython/cpython\nRemoving SSH command configuration\n[command]/usr/bin/git config --local --name-only --get-regexp core\\.sshCommand\n[command]/usr/bin/git submodule foreach --recursive sh -c \"git config --local --name-only --get-regexp 'core\\.sshCommand' \u0026\u0026 git config --local --unset-all 'core.sshCommand' || :\"\nRemoving HTTP extra header\n[command]/usr/bin/git config --local --name-only --get-regexp http\\.https\\:\\/\\/github\\.com\\/\\.extraheader\n[command]/usr/bin/git submodule foreach --recursive sh -c \"git config --local --name-only --get-regexp 'http\\.https\\:\\/\\/github\\.com\\/\\.extraheader' \u0026\u0026 git config --local --unset-all 'http.https://github.com/.extraheader' || :\"\nRemoving includeIf entries pointing to credentials config files\n[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf\\.gitdir:\n[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url\nCleaning up orphan processes\n```\n\n\u003c/details\u003e\n\nBy the way, the Checkout step runs `git config --local gc.auto 0`: according to https://github.com/actions/checkout/issues/2437, this command is no longer useful.","author":{"url":"https://github.com/vstinner","@type":"Person","name":"vstinner"},"datePublished":"2026-06-11T16:46:38.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/151365/cpython/issues/151365"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e58716c0-37d7-316e-4baa-ae79974c63ee |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D9CC:29226:455F77:648240:6A4E0897 |
| html-safe-nonce | c0e78d3768b9c0ee6c871bebf6875842afc03b131f107f5e8a257466a939baf4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOUNDOjI5MjI2OjQ1NUY3Nzo2NDgyNDA6NkE0RTA4OTciLCJ2aXNpdG9yX2lkIjoiNzQ0OTY1NDUwODI0MDI2MjYzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | c99156963f69391c6a37cfa8b35f404abd51007e788609aab8abf131a219e4ef |
| hovercard-subject-tag | issue:4642482142 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/151365/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ede765611c670e7de926ed536573f029d427b9815d1849780ed00a8f0dcc6a87/python/cpython/issues/151365 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ede765611c670e7de926ed536573f029d427b9815d1849780ed00a8f0dcc6a87/python/cpython/issues/151365 |
| og:image:alt | Bug report git fetch origin "+4991c6a11cdf8273484e2c48cc83289caf769a56:remotes/origin/dataclass-eq-doc-update-3-13" --depth=12 --no-tags --prune --no-recurse-submodules failed with: From https://gi... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vstinner |
| hostname | github.com |
| expected-hostname | github.com |
| None | df0492960db29b4938cb72070351d6b1d0c6c0767b27ceb8394bbf4fcc0223c6 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 52bde38e24398476f8eb1e0760c81346c6a00812 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width