Skip to content

Commit

Permalink
perf(download): improve clone
Browse files Browse the repository at this point in the history
  • Loading branch information
beeb committed Aug 22, 2024
1 parent 1246f06 commit 89b33a6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ pub async fn clone_repo(
path: impl AsRef<Path>,
) -> Result<String> {
let path = path.as_ref().to_path_buf();
run_git_command(&["clone", "--tags", url, path.to_string_lossy().as_ref()], None).await?;
run_git_command(
&["clone", "--tags", "--filter=tree:0", url, path.to_string_lossy().as_ref()],
None,
)
.await?;
if let Some(rev) = rev {
run_git_command(&["checkout", rev.as_ref()], Some(&path)).await?;
}
Expand Down

0 comments on commit 89b33a6

Please sign in to comment.