1
0
Fork 0
mirror of https://code.forgejo.org/actions/checkout.git synced 2026-03-09 14:35:48 +00:00

feat: override fetch-depth to 0 when reference-cache is active

When reference-cache is enabled, shallow fetches (fetch-depth > 0) are
counterproductive because objects are served from the local cache.
Shallow negotiation only adds network latency without saving bandwidth.

If fetch-depth was not explicitly set by the user, it is automatically
overridden to 0. If explicitly set, a warning is emitted explaining
the performance impact.

Signed-off-by: Michael Wyraz <mw@brick4u.de>
This commit is contained in:
Michael Wyraz 2026-03-05 15:54:36 +01:00
parent 9ddd3f4b35
commit ed69f3bbdd
6 changed files with 153 additions and 2 deletions

View file

@ -1159,6 +1159,7 @@ async function setup(testName: string): Promise<void> {
sparseCheckout: [],
sparseCheckoutConeMode: true,
fetchDepth: 1,
fetchDepthExplicit: false,
fetchTags: false,
showProgress: true,
lfs: false,