mirror of
				https://code.forgejo.org/actions/checkout.git
				synced 2025-11-04 14:49:12 +00:00 
			
		
		
		
	Merge f63be2acac into ff7abcd0c3
				
					
				
			This commit is contained in:
		
						commit
						e04ad54e4a
					
				
					 3 changed files with 8 additions and 0 deletions
				
			
		| 
						 | 
					@ -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',
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										3
									
								
								dist/index.js
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								dist/index.js
									
										
									
									
										vendored
									
									
								
							| 
						 | 
					@ -656,6 +656,9 @@ class GitCommandManager {
 | 
				
			||||||
            if (!refSpec.some(x => x === refHelper.tagsRefSpec) && !options.fetchTags) {
 | 
					            if (!refSpec.some(x => x === refHelper.tagsRefSpec) && !options.fetchTags) {
 | 
				
			||||||
                args.push('--no-tags');
 | 
					                args.push('--no-tags');
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					            else if (options.fetchTags) {
 | 
				
			||||||
 | 
					                args.push('--tags');
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            args.push('--prune', '--no-recurse-submodules');
 | 
					            args.push('--prune', '--no-recurse-submodules');
 | 
				
			||||||
            if (options.showProgress) {
 | 
					            if (options.showProgress) {
 | 
				
			||||||
                args.push('--progress');
 | 
					                args.push('--progress');
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -263,6 +263,8 @@ class GitCommandManager {
 | 
				
			||||||
    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) && !options.fetchTags) {
 | 
				
			||||||
      args.push('--no-tags')
 | 
					      args.push('--no-tags')
 | 
				
			||||||
 | 
					    } else if (options.fetchTags) {
 | 
				
			||||||
 | 
					      args.push('--tags')
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    args.push('--prune', '--no-recurse-submodules')
 | 
					    args.push('--prune', '--no-recurse-submodules')
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue