1
0
Fork 0
mirror of https://code.forgejo.org/actions/checkout.git synced 2025-03-12 12:35:21 +01:00

fix fetch-tags when fetch-depth > 0

This commit is contained in:
Rodrigo Chacon 2025-03-07 14:05:11 -03:00
parent 85e6279cec
commit e463b2c101
No known key found for this signature in database
2 changed files with 3 additions and 0 deletions

View file

@ -248,6 +248,7 @@ describe('Test fetchDepth and fetchTags options', () => {
'-c',
'protocol.version=2',
'fetch',
'--tags',
'--prune',
'--no-recurse-submodules',
'--filter=filterValue',

View file

@ -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 {
args.push('--tags')
}
args.push('--prune', '--no-recurse-submodules')