Merge f63be2acac241cf31c81c5a3d7bd6de66b82fc79 into 09d2acae674a48949e3602304ab46fd20ae0c42f

This commit is contained in:
Alessio Izzo 2025-06-06 13:47:18 -04:00 committed by GitHub
commit 9142b39971
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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')