mirror of
https://code.forgejo.org/actions/checkout.git
synced 2025-04-07 18:24:18 +02:00
#1467 fix fetchTags=true do not fetch tags
This commit is contained in:
parent
85e6279cec
commit
de1c608fff
2 changed files with 5 additions and 0 deletions
|
@ -134,6 +134,7 @@ describe('Test fetchDepth and fetchTags options', () => {
|
|||
'-c',
|
||||
'protocol.version=2',
|
||||
'fetch',
|
||||
'--tags',
|
||||
'--prune',
|
||||
'--no-recurse-submodules',
|
||||
'--filter=filterValue',
|
||||
|
@ -248,6 +249,7 @@ describe('Test fetchDepth and fetchTags options', () => {
|
|||
'-c',
|
||||
'protocol.version=2',
|
||||
'fetch',
|
||||
'--tags',
|
||||
'--prune',
|
||||
'--no-recurse-submodules',
|
||||
'--filter=filterValue',
|
||||
|
@ -364,6 +366,7 @@ describe('Test fetchDepth and fetchTags options', () => {
|
|||
'-c',
|
||||
'protocol.version=2',
|
||||
'fetch',
|
||||
'--tags',
|
||||
'--prune',
|
||||
'--no-recurse-submodules',
|
||||
'--progress',
|
||||
|
|
|
@ -263,6 +263,8 @@ class GitCommandManager {
|
|||
const args = ['-c', 'protocol.version=2', 'fetch']
|
||||
if (!refSpec.some(x => x === refHelper.tagsRefSpec) && !options.fetchTags) {
|
||||
args.push('--no-tags')
|
||||
} else if (options.fetchTags) {
|
||||
args.push('--tags')
|
||||
}
|
||||
|
||||
args.push('--prune', '--no-recurse-submodules')
|
||||
|
|
Loading…
Add table
Reference in a new issue