mirror of
				https://github.com/actions/checkout.git
				synced 2025-11-04 05:58:40 +08:00 
			
		
		
		
	Merge 44b7815b62 into ac59398561
				
					
				
			This commit is contained in:
		
						commit
						e1b045a734
					
				
							
								
								
									
										6
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							| 
						 | 
					@ -9387,8 +9387,10 @@ function prepareExistingDirectory(git, repositoryPath, repositoryUrl, clean, ref
 | 
				
			||||||
            remove = true;
 | 
					            remove = true;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        // Fetch URL does not match
 | 
					        // Fetch URL does not match
 | 
				
			||||||
        else if (!fsHelper.directoryExistsSync(path.join(repositoryPath, '.git')) ||
 | 
					        else if (!fsHelper.directoryExistsSync(path.join(repositoryPath, '.git'))) {
 | 
				
			||||||
            repositoryUrl !== (yield git.tryGetFetchUrl())) {
 | 
					            remove = clean;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        else if (repositoryUrl !== (yield git.tryGetFetchUrl())) {
 | 
				
			||||||
            remove = true;
 | 
					            remove = true;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        else {
 | 
					        else {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -24,10 +24,10 @@ export async function prepareExistingDirectory(
 | 
				
			||||||
    remove = true
 | 
					    remove = true
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  // Fetch URL does not match
 | 
					  // Fetch URL does not match
 | 
				
			||||||
  else if (
 | 
					  else if (!fsHelper.directoryExistsSync(path.join(repositoryPath, '.git'))) {
 | 
				
			||||||
    !fsHelper.directoryExistsSync(path.join(repositoryPath, '.git')) ||
 | 
					    remove = clean
 | 
				
			||||||
    repositoryUrl !== (await git.tryGetFetchUrl())
 | 
					  }
 | 
				
			||||||
  ) {
 | 
					  else if (repositoryUrl !== (await git.tryGetFetchUrl())) {
 | 
				
			||||||
    remove = true
 | 
					    remove = true
 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
    // Delete any index.lock and shallow.lock left by a previously canceled run or crashed git process
 | 
					    // Delete any index.lock and shallow.lock left by a previously canceled run or crashed git process
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user