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:
parent
3d677ac575
commit
b0b939aaa5
8 changed files with 52 additions and 9 deletions
|
@ -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',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue