mirror of
https://github.com/actions/checkout.git
synced 2025-07-17 20:18:26 +02:00
updates
This commit is contained in:
parent
50ecf51910
commit
819730283a
2 changed files with 15 additions and 13 deletions
|
@ -110,8 +110,12 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
|
|||
sparse-checkout-cone-mode: ''
|
||||
|
||||
# Number of commits to fetch. 0 indicates all history for all branches and tags.
|
||||
# Default: 1
|
||||
fetch-depth: ''
|
||||
|
||||
# Date like `2days` or `1970-01-01`. Fetch a history after the specified time.
|
||||
shallow-since: ''
|
||||
|
||||
# Whether to fetch tags, even if fetch-depth > 0.
|
||||
# Default: false
|
||||
fetch-tags: ''
|
||||
|
@ -120,9 +124,6 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
|
|||
# Default: true
|
||||
show-progress: ''
|
||||
|
||||
# Date like `2days` or `1970-01-01`. Fetch a history after the specified time.
|
||||
shallow-since: ''
|
||||
|
||||
# Whether to download Git-LFS files
|
||||
# Default: false
|
||||
lfs: ''
|
||||
|
|
|
@ -33,16 +33,13 @@ export interface IGitCommandManager {
|
|||
configExists(configKey: string, globalConfig?: boolean): Promise<boolean>
|
||||
fetch(
|
||||
refSpec: string[],
|
||||
fetchDepth?: number,
|
||||
shallowSince?: string,
|
||||
options: {
|
||||
filter?: string,
|
||||
fetchDepth?: number,
|
||||
shallowSince?: string,
|
||||
fetchTags?: boolean,
|
||||
filter?: string
|
||||
fetchDepth?: number
|
||||
shallowSince?: string
|
||||
fetchTags?: boolean
|
||||
showProgress?: boolean
|
||||
}
|
||||
|
||||
): Promise<void>
|
||||
getDefaultBranch(repositoryUrl: string): Promise<string>
|
||||
getWorkingDirectory(): string
|
||||
|
@ -58,6 +55,7 @@ export interface IGitCommandManager {
|
|||
shaExists(sha: string): Promise<boolean>
|
||||
submoduleForeach(command: string, recursive: boolean): Promise<string>
|
||||
submoduleSync(recursive: boolean): Promise<void>
|
||||
submoduleStatus(): Promise<boolean>
|
||||
submoduleUpdate(
|
||||
fetchDepth: number,
|
||||
recursive: boolean,
|
||||
|
@ -262,8 +260,8 @@ class GitCommandManager {
|
|||
refSpec: string[],
|
||||
options: {
|
||||
filter?: string
|
||||
fetchDepth?: number,
|
||||
shallowSince?: string,
|
||||
fetchDepth?: number
|
||||
shallowSince?: string
|
||||
fetchTags?: boolean
|
||||
showProgress?: boolean
|
||||
}
|
||||
|
@ -284,7 +282,9 @@ class GitCommandManager {
|
|||
|
||||
if (options.shallowSince) {
|
||||
args.push(`--shallow-since=${options.shallowSince}`)
|
||||
} else if (options.fetchDepth && options.fetchDepth > 0) {
|
||||
}
|
||||
|
||||
if (options.fetchDepth && options.fetchDepth > 0) {
|
||||
args.push(`--depth=${options.fetchDepth}`)
|
||||
} else if (
|
||||
fshelper.fileExistsSync(
|
||||
|
@ -429,6 +429,7 @@ class GitCommandManager {
|
|||
if (fetchDepth > 0) {
|
||||
args.push(`--depth=${fetchDepth}`)
|
||||
}
|
||||
|
||||
if (shallowSince) {
|
||||
args.push(`--shallow-since=${shallowSince}`)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue