Compare commits

...

2 commits

Author SHA1 Message Date
Rodrigo Chacon
c7f000fcc7
Merge e463b2c101 into 8edcb1bdb4 2025-07-28 22:57:15 +07: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

@ -263,6 +263,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')