diff --git a/__test__/git-command-manager.test.ts b/__test__/git-command-manager.test.ts index cea73d4..2fa758e 100644 --- a/__test__/git-command-manager.test.ts +++ b/__test__/git-command-manager.test.ts @@ -248,6 +248,7 @@ describe('Test fetchDepth and fetchTags options', () => { '-c', 'protocol.version=2', 'fetch', + '--tags', '--prune', '--no-recurse-submodules', '--filter=filterValue', diff --git a/src/git-command-manager.ts b/src/git-command-manager.ts index 8e42a38..a840e20 100644 --- a/src/git-command-manager.ts +++ b/src/git-command-manager.ts @@ -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 { + args.push('--tags') } args.push('--prune', '--no-recurse-submodules')