1
0
Fork 0
mirror of https://github.com/actions/checkout.git synced 2025-07-13 20:50:45 +00:00

add shallow-since option

This commit is contained in:
satotake 2021-10-20 23:56:37 +09:00
parent 3d677ac575
commit b0b939aaa5
8 changed files with 52 additions and 9 deletions

View file

@ -141,7 +141,7 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
}
} else {
const refSpec = refHelper.getRefSpec(settings.ref, settings.commit)
await git.fetch(refSpec, settings.fetchDepth)
await git.fetch(refSpec, settings.fetchDepth, settings.shallowSince)
}
core.endGroup()
@ -181,7 +181,8 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
await git.submoduleSync(settings.nestedSubmodules)
await git.submoduleUpdate(
settings.fetchDepth,
settings.nestedSubmodules
settings.nestedSubmodules,
settings.shallowSince
)
await git.submoduleForeach(
'git config --local gc.auto 0',