5
0
Fork 0
mirror of https://github.com/actions/checkout.git synced 2025-11-11 15:36:56 +00:00

Compare commits

...

2 commits

Author SHA1 Message Date
Andrei Neculau
28772b5273
Merge 0776c3a4db into 069c695914 2025-11-03 13:20:41 -06:00
Andrei Neculau
0776c3a4db
fetch tags when fetch-depth > 0. fix #1781 2025-01-14 19:48:35 +01:00

View file

@ -285,8 +285,12 @@ class GitCommandManager {
} }
): Promise<void> { ): Promise<void> {
const args = ['-c', 'protocol.version=2', 'fetch'] const args = ['-c', 'protocol.version=2', 'fetch']
if (!refSpec.some(x => x === refHelper.tagsRefSpec) && !options.fetchTags) { if (options.fetchTags) {
args.push('--no-tags') args.push('--tags')
} else {
if (!refSpec.some(x => x === refHelper.tagsRefSpec)) {
args.push('--no-tags')
}
} }
args.push('--prune', '--no-recurse-submodules') args.push('--prune', '--no-recurse-submodules')