From 3b57c7384cdaa30dfad9abac784df92ee9475d84 Mon Sep 17 00:00:00 2001 From: SukkaW Date: Tue, 19 Nov 2024 20:07:01 +0800 Subject: [PATCH] feat: treeless clone --- src/git-utils.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/git-utils.ts b/src/git-utils.ts index 43c43866e..e59352fcb 100644 --- a/src/git-utils.ts +++ b/src/git-utils.ts @@ -105,7 +105,15 @@ export async function setRepo(inps: Inputs, remoteURL: string, workDir: string): try { result.exitcode = await exec.exec( 'git', - ['clone', '--depth=1', '--single-branch', '--branch', inps.PublishBranch, remoteURL, workDir], + [ + 'clone', + '--filter=tree:0', + '--single-branch', + '--branch', + inps.PublishBranch, + remoteURL, + workDir + ], options ); if (result.exitcode === 0) {