pub struct GitFetcher {
pub cache_root: PathBuf,
}Expand description
Git-backed dependency fetcher.
Uses the system git CLI. On fetch it clones (or updates) into
<cache_root>/git/<key>/, then checks out the requested tag/branch/rev.
When force is false and the checkout already exists at the right commit,
it is reused without re-cloning.
Fields§
§cache_root: PathBufRoot directory holding all cached dependencies (e.g. .sdkt-cache).
Implementations§
Source§impl GitFetcher
impl GitFetcher
Sourcepub fn resolved_rev_for(dep: &Dependency, checkout: &Path) -> String
pub fn resolved_rev_for(dep: &Dependency, checkout: &Path) -> String
The commit SHA that a given reference resolves to (empty on failure).
Trait Implementations§
Source§impl DependencyFetcher for GitFetcher
impl DependencyFetcher for GitFetcher
Source§fn fetch(
&self,
name: &str,
dep: &Dependency,
force: bool,
) -> Result<FetchOutcome, FetchError>
fn fetch( &self, name: &str, dep: &Dependency, force: bool, ) -> Result<FetchOutcome, FetchError>
Materialize
dep (named name) into the cache and return its on-disk
location. force re-fetches/updates an existing checkout.Auto Trait Implementations§
impl Freeze for GitFetcher
impl RefUnwindSafe for GitFetcher
impl Send for GitFetcher
impl Sync for GitFetcher
impl Unpin for GitFetcher
impl UnsafeUnpin for GitFetcher
impl UnwindSafe for GitFetcher
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more