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