From b3b48db6f699d85bd1330ab7fdb0541834c74068 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 7 Feb 2023 13:44:27 -0800 Subject: [PATCH] blast_repo: only get the last commit (#57) Should make local clone much faster --- pkgs/blast_repo/lib/src/utils.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/blast_repo/lib/src/utils.dart b/pkgs/blast_repo/lib/src/utils.dart index 1c83a101..0e511e3d 100644 --- a/pkgs/blast_repo/lib/src/utils.dart +++ b/pkgs/blast_repo/lib/src/utils.dart @@ -13,7 +13,13 @@ const packageName = 'blast_repo'; Future cloneGitHubRepoToPath(String slug, String path) { printHeader('Cloning repo $slug'); return runGit( - ['clone', 'https://github.com/$slug', path], + [ + 'clone', + '--depth', + '1', + 'https://github.com/$slug', + path, + ], echoOutput: true, ); }