mirror of
https://github.com/pesde-pkg/pesde.git
synced 2024-12-12 11:00:36 +00:00
perf: shallow clone dependency repos
This commit is contained in:
parent
f0d19bb5e1
commit
92c6120d24
2 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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<P: AsRef<Path>>(
|
|||
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<P: AsRef<Path>>(
|
|||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue