Merge 38cc68387c3b860d300c418c96d22b847a064a94 into b4ffde65f46336ab88eb53be808477a3936bae11

This commit is contained in:
Samuel Lijin 2023-10-18 18:54:01 +03:30 committed by GitHub
commit 5242ce5dd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -41,6 +41,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>
@ -329,6 +330,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]

View File

@ -223,6 +223,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