Compare commits

...

3 commits

Author SHA1 Message Date
Alessio Izzo
ebe457fb5e
Merge f63be2acac into 8edcb1bdb4 2025-07-28 22:56:19 +07:00
Alessio Izzo
f63be2acac
#1467 update dist 2025-04-05 15:46:28 +02:00
Alessio Izzo
de1c608fff
#1467 fix fetchTags=true do not fetch tags 2025-04-05 15:43:33 +02:00
3 changed files with 8 additions and 0 deletions

View file

@ -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',

3
dist/index.js vendored
View file

@ -656,6 +656,9 @@ class GitCommandManager {
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');
if (options.showProgress) {
args.push('--progress');

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