mirror of
				https://github.com/actions/checkout.git
				synced 2025-10-31 05:25:55 +08:00 
			
		
		
		
	Handle hidden refs (#1774)
Co-authored-by: Chris Gavin <chris@chrisgavin.me>
This commit is contained in:
		
							
								
								
									
										6
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							| @@ -2000,9 +2000,13 @@ function getCheckoutInfo(git, ref, commit) { | ||||
|             result.ref = `refs/remotes/pull/${branch}`; | ||||
|         } | ||||
|         // refs/tags/
 | ||||
|         else if (upperRef.startsWith('REFS/')) { | ||||
|         else if (upperRef.startsWith('REFS/TAGS/')) { | ||||
|             result.ref = ref; | ||||
|         } | ||||
|         // refs/
 | ||||
|         else if (upperRef.startsWith('REFS/') && commit) { | ||||
|             result.ref = commit; | ||||
|         } | ||||
|         // Unqualified ref, check for a matching branch or tag
 | ||||
|         else { | ||||
|             if (yield git.branchExists(true, `origin/${ref}`)) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user