Compare commits

...

2 Commits

Author SHA1 Message Date
Rodrigo Chacon
e975dae3d2
Merge e463b2c101 into c2d88d3ecc 2025-11-24 13:56:19 +01:00
Rodrigo Chacon
e463b2c101
fix fetch-tags when fetch-depth > 0 2025-03-07 14:05:11 -03:00
2 changed files with 3 additions and 0 deletions

View File

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

View File

@ -287,6 +287,8 @@ class GitCommandManager {
const args = ['-c', 'protocol.version=2', 'fetch'] const args = ['-c', 'protocol.version=2', 'fetch']
if (!refSpec.some(x => x === refHelper.tagsRefSpec) && !options.fetchTags) { if (!refSpec.some(x => x === refHelper.tagsRefSpec) && !options.fetchTags) {
args.push('--no-tags') args.push('--no-tags')
} else {
args.push('--tags')
} }
args.push('--prune', '--no-recurse-submodules') args.push('--prune', '--no-recurse-submodules')