From 3114de9b3cf84c0829fe84222d8ae8d806fbc794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20HOUZ=C3=89?= Date: Fri, 12 Nov 2021 01:01:27 +0100 Subject: [PATCH] perf: add sparse index option in sparse checkout init See https://github.blog/2021-11-10-make-your-monorepo-feel-small-with-gits-sparse-index/ --- action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yaml b/action.yaml index f9cca51..61839ee 100644 --- a/action.yaml +++ b/action.yaml @@ -35,7 +35,7 @@ runs: REPO="https://${GITHUB_ACTOR}:${{ inputs.token }}@github.com/${GITHUB_REPOSITORY}.git" BRANCH="${GITHUB_REF/#refs\/heads\//}" git clone --filter=blob:none --no-checkout --depth 1 --sparse $REPO . - git sparse-checkout init --cone + git sparse-checkout init --cone --sparse-index git sparse-checkout set ${{ inputs.patterns }} git -c protocol.version=2 fetch --no-tags --prune --progress --depth=1 origin +${GITHUB_SHA}:refs/remotes/origin/${BRANCH} git checkout --progress --force -B $BRANCH refs/remotes/origin/$BRANCH