@@ -6,25 +6,24 @@ Use the default shallow checkout for jobs that only read files or test prebuilt
66wheels. Source builds need complete commit ancestry and release tags so
77` setuptools-scm ` can derive each package's version.
88
9- For those jobs, use ` fetch-depth: 2147483647 ` with ` fetch-tags: true ` .
10- ` 2147483647 ` is Git's ` INFINITE_DEPTH ` value, also used by `git fetch
11- --unshallow`. It produces a complete, non-shallow history. Unlike
12- ` fetch-depth: 0 ` , this positive value makes ` actions/checkout ` fetch only the
13- requested ref or event SHA plus tags, instead of every branch. In particular,
14- it avoids the large, unrelated ` gh-pages ` history discussed in issue #2197 .
15- Keep ` filter: blob:none ` where historical file contents are unnecessary.
16-
17- Jobs comparing branches must fetch the comparison ref explicitly. CI change
18- detection fetches the PR base branch before computing its merge base; non-PR
19- runs need only a shallow checkout. PR-preview cleanup checks out the script
20- shallowly and fetches ` gh-pages ` separately when needed.
21-
22- Git documents this value in its
23- [ shallow repository reference] ( https://git-scm.com/docs/shallow ) .
24- The pinned checkout action chooses its refspec in
25- [ ` git-source-provider.ts ` ] ( https://github.com/actions/checkout/blob/3d3c42e5aac5ba805825da76410c181273ba90b1/src/git-source-provider.ts#L173-L202 )
26- and
27- [ ` ref-helper.ts ` ] ( https://github.com/actions/checkout/blob/3d3c42e5aac5ba805825da76410c181273ba90b1/src/ref-helper.ts#L79-L147 ) .
9+ For those jobs, use ` fetch-depth: 0 ` with ` filter: blob:none ` . The checkout
10+ action fetches complete ancestry for all branches and tags, while the blob
11+ filter skips historical file contents. This avoids downloading the large
12+ historical ` gh-pages ` contents discussed in issue #2197 . Git retrieves file
13+ contents as needed when checking out the requested commit or creating the
14+ freshness check's base-commit worktree.
15+
16+ CI change detection uses this full-history checkout for PR mirrors, so the
17+ actual PR base branch is available when computing its merge base. Non-PR runs
18+ need only a shallow checkout. PR-preview cleanup checks out its script
19+ shallowly and fetches ` gh-pages ` separately when needed. Pathfinder release
20+ preparation fetches its exact tag without requesting every other tag.
21+
22+ Git documents blob filtering in its
23+ [ clone reference] ( https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---filterltfilter-specgt ) .
24+ The pinned checkout action's
25+ [ ` fetch implementation ` ] ( https://github.com/actions/checkout/blob/3d3c42e5aac5ba805825da76410c181273ba90b1/src/git-source-provider.ts#L161-L202 )
26+ preserves full ancestry and tags at depth zero.
2827
2928## Repository Customizations
3029
0 commit comments