From de1c608fff59cd28efd1f02c9211a6631fec5062 Mon Sep 17 00:00:00 2001 From: Alessio Izzo Date: Sat, 5 Apr 2025 15:43:33 +0200 Subject: [PATCH 1/2] #1467 fix fetchTags=true do not fetch tags --- __test__/git-command-manager.test.ts | 3 +++ src/git-command-manager.ts | 2 ++ 2 files changed, 5 insertions(+) diff --git a/__test__/git-command-manager.test.ts b/__test__/git-command-manager.test.ts index cea73d4..9b12027 100644 --- a/__test__/git-command-manager.test.ts +++ b/__test__/git-command-manager.test.ts @@ -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', diff --git a/src/git-command-manager.ts b/src/git-command-manager.ts index 8e42a38..8729c6a 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 if (options.fetchTags) { + args.push('--tags') } args.push('--prune', '--no-recurse-submodules') From f63be2acac241cf31c81c5a3d7bd6de66b82fc79 Mon Sep 17 00:00:00 2001 From: Alessio Izzo Date: Sat, 5 Apr 2025 15:46:28 +0200 Subject: [PATCH 2/2] #1467 update dist --- dist/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dist/index.js b/dist/index.js index b0db713..10949f2 100644 --- a/dist/index.js +++ b/dist/index.js @@ -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');