mirror of
https://github.com/actions/checkout.git
synced 2025-07-04 21:08:24 +02:00
Support fetch-jobs: 0 to use as many jobs as there are processors
The default is now fetch-jobs: -1, which is the new value for reverting to normal git behavior (provide no --jobs argument).
This commit is contained in:
@ -327,7 +327,7 @@ class GitCommandManager {
|
||||
args.push('--recursive')
|
||||
}
|
||||
|
||||
if (fetchJobs > 0) {
|
||||
if (fetchJobs > -1) {
|
||||
args.push(`--jobs=${fetchJobs}`)
|
||||
}
|
||||
|
||||
|
@ -89,9 +89,9 @@ export function getInputs(): IGitSourceSettings {
|
||||
core.debug(`fetch depth = ${result.fetchDepth}`)
|
||||
|
||||
// Fetch jobs
|
||||
result.fetchJobs = Math.floor(Number(core.getInput('fetch-jobs') || '0'))
|
||||
if (isNaN(result.fetchJobs) || result.fetchJobs < 0) {
|
||||
result.fetchJobs = 0
|
||||
result.fetchJobs = Math.floor(Number(core.getInput('fetch-jobs') || '-1'))
|
||||
if (isNaN(result.fetchJobs) || result.fetchJobs < -1) {
|
||||
result.fetchJobs = -1
|
||||
}
|
||||
core.debug(`fetch jobs = ${result.fetchJobs}`)
|
||||
|
||||
|
Reference in New Issue
Block a user