From cfbcb3f73c375134914a746484a5846f69b6f861 Mon Sep 17 00:00:00 2001 From: Caleb White Date: Wed, 21 Feb 2024 16:12:22 -0600 Subject: [PATCH] chore: clone examples with depth=1 to speed up test --- script/parse-examples | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/parse-examples b/script/parse-examples index 6c47a240..47ed4b34 100755 --- a/script/parse-examples +++ b/script/parse-examples @@ -12,14 +12,14 @@ function clone_repo { path=examples/$name if [ ! -d "$path" ]; then echo "Cloning $owner/$name" - git clone "https://github.com/$owner/$name" "$path" + git clone --depth 1 "https://github.com/$owner/$name" "$path" fi pushd "$path" >/dev/null actual_sha=$(git rev-parse HEAD) if [ "$actual_sha" != "$sha" ]; then echo "Updating $owner/$name to $sha" - git fetch + git fetch --depth 1 origin "$sha" git reset --hard "$sha" fi popd >/dev/null