mirror of
https://github.com/actions/checkout.git
synced 2025-06-13 12:54:58 +00:00
Allow to fetch tags.
This commit is contained in:
parent
df9ce67227
commit
6b47c9436e
@ -134,6 +134,7 @@ describe('Test fetchDepth and fetchTags options', () => {
|
|||||||
'-c',
|
'-c',
|
||||||
'protocol.version=2',
|
'protocol.version=2',
|
||||||
'fetch',
|
'fetch',
|
||||||
|
'--tags',
|
||||||
'--prune',
|
'--prune',
|
||||||
'--no-recurse-submodules',
|
'--no-recurse-submodules',
|
||||||
'--filter=filterValue',
|
'--filter=filterValue',
|
||||||
@ -248,6 +249,7 @@ describe('Test fetchDepth and fetchTags options', () => {
|
|||||||
'-c',
|
'-c',
|
||||||
'protocol.version=2',
|
'protocol.version=2',
|
||||||
'fetch',
|
'fetch',
|
||||||
|
'--tags',
|
||||||
'--prune',
|
'--prune',
|
||||||
'--no-recurse-submodules',
|
'--no-recurse-submodules',
|
||||||
'--filter=filterValue',
|
'--filter=filterValue',
|
||||||
@ -364,6 +366,7 @@ describe('Test fetchDepth and fetchTags options', () => {
|
|||||||
'-c',
|
'-c',
|
||||||
'protocol.version=2',
|
'protocol.version=2',
|
||||||
'fetch',
|
'fetch',
|
||||||
|
'--tags',
|
||||||
'--prune',
|
'--prune',
|
||||||
'--no-recurse-submodules',
|
'--no-recurse-submodules',
|
||||||
'--progress',
|
'--progress',
|
||||||
|
4
dist/index.js
vendored
4
dist/index.js
vendored
@ -653,8 +653,8 @@ class GitCommandManager {
|
|||||||
fetch(refSpec, options) {
|
fetch(refSpec, options) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const args = ['-c', 'protocol.version=2', 'fetch'];
|
const args = ['-c', 'protocol.version=2', 'fetch'];
|
||||||
if (!refSpec.some(x => x === refHelper.tagsRefSpec) && !options.fetchTags) {
|
if (!refSpec.some(x => x === refHelper.tagsRefSpec)) {
|
||||||
args.push('--no-tags');
|
args.push(options.fetchTags ? '--tags' : '--no-tags');
|
||||||
}
|
}
|
||||||
args.push('--prune', '--no-recurse-submodules');
|
args.push('--prune', '--no-recurse-submodules');
|
||||||
if (options.showProgress) {
|
if (options.showProgress) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user