Skip to content

Commit de1c608

Browse files
committed
actions#1467 fix fetchTags=true do not fetch tags
1 parent 85e6279 commit de1c608

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

__test__/git-command-manager.test.ts

+3
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ describe('Test fetchDepth and fetchTags options', () => {
134134
'-c',
135135
'protocol.version=2',
136136
'fetch',
137+
'--tags',
137138
'--prune',
138139
'--no-recurse-submodules',
139140
'--filter=filterValue',
@@ -248,6 +249,7 @@ describe('Test fetchDepth and fetchTags options', () => {
248249
'-c',
249250
'protocol.version=2',
250251
'fetch',
252+
'--tags',
251253
'--prune',
252254
'--no-recurse-submodules',
253255
'--filter=filterValue',
@@ -364,6 +366,7 @@ describe('Test fetchDepth and fetchTags options', () => {
364366
'-c',
365367
'protocol.version=2',
366368
'fetch',
369+
'--tags',
367370
'--prune',
368371
'--no-recurse-submodules',
369372
'--progress',

src/git-command-manager.ts

+2
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,8 @@ class GitCommandManager {
263263
const args = ['-c', 'protocol.version=2', 'fetch']
264264
if (!refSpec.some(x => x === refHelper.tagsRefSpec) && !options.fetchTags) {
265265
args.push('--no-tags')
266+
} else if (options.fetchTags) {
267+
args.push('--tags')
266268
}
267269

268270
args.push('--prune', '--no-recurse-submodules')

0 commit comments

Comments
 (0)