mirror of
				https://code.forgejo.org/actions/checkout.git
				synced 2025-11-04 14:49:12 +00:00 
			
		
		
		
	Merge 38cc68387c into ff7abcd0c3
				
					
				
			This commit is contained in:
		
						commit
						9dbd65c315
					
				
					 2 changed files with 10 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -44,6 +44,7 @@ export interface IGitCommandManager {
 | 
			
		|||
  getWorkingDirectory(): string
 | 
			
		||||
  init(): Promise<void>
 | 
			
		||||
  isDetached(): Promise<boolean>
 | 
			
		||||
  lfsCheckout(): Promise<void>
 | 
			
		||||
  lfsFetch(ref: string): Promise<void>
 | 
			
		||||
  lfsInstall(): Promise<void>
 | 
			
		||||
  log1(format?: string): Promise<string>
 | 
			
		||||
| 
						 | 
				
			
			@ -340,6 +341,10 @@ class GitCommandManager {
 | 
			
		|||
    return !output.stdout.trim().startsWith('refs/heads/')
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  async lfsCheckout(): Promise<void> {
 | 
			
		||||
    await this.execGit(['lfs', 'checkout'])
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  async lfsFetch(ref: string): Promise<void> {
 | 
			
		||||
    const args = ['lfs', 'fetch', 'origin', ref]
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -232,6 +232,11 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
 | 
			
		|||
    await git.checkout(checkoutInfo.ref, checkoutInfo.startPoint)
 | 
			
		||||
    core.endGroup()
 | 
			
		||||
 | 
			
		||||
    // LFS checkout
 | 
			
		||||
    core.startGroup('Checking out LFS objects')
 | 
			
		||||
    await git.lfsCheckout()
 | 
			
		||||
    core.endGroup()
 | 
			
		||||
 | 
			
		||||
    // Submodules
 | 
			
		||||
    if (settings.submodules) {
 | 
			
		||||
      // Temporarily override global config
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue