diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bc110c..f95641e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Use updated aliases when reusing lockfile dependencies by @daimond113 - Listen for device flow completion without requiring pressing enter by @daimond113 +### Performance +- Clone dependency repos shallowly by @daimond113 + ## [0.5.0-rc.6] - 2024-10-14 ### Added - Support full version requirements in workspace version field by @daimond113 diff --git a/src/cli/repos.rs b/src/cli/repos.rs index 692a1f4..fbbe8f7 100644 --- a/src/cli/repos.rs +++ b/src/cli/repos.rs @@ -3,7 +3,7 @@ use crate::{ util::authenticate_conn, }; use anyhow::Context; -use gix::remote::Direction; +use gix::remote::{fetch::Shallow, Direction}; use pesde::Project; use std::path::Path; @@ -33,6 +33,7 @@ fn update_repo>( let results = connection .prepare_fetch(gix::progress::Discard, Default::default()) .context(format!("failed to prepare {name} repository fetch"))? + .with_shallow(Shallow::Deepen(1)) .receive(gix::progress::Discard, &false.into()) .context(format!("failed to receive new {name} repository contents"))?; @@ -89,6 +90,7 @@ fn update_repo>( gix::prepare_clone(url, path) .context(format!("failed to prepare {name} repository clone"))? + .with_shallow(Shallow::Deepen(1)) .fetch_then_checkout(gix::progress::Discard, &false.into()) .context(format!("failed to fetch and checkout {name} repository"))? .0