MCPcopy Create free account
hub / github.com/f0rr0/oliphaunt / ensure_clean_checkout

Function ensure_clean_checkout

xtask/src/main.rs:5208–5222  ·  view source on GitHub ↗
(source: &SourcePin, path: &Path)

Source from the content-addressed store, hash-verified

5206}
5207
5208fn ensure_clean_checkout(source: &SourcePin, path: &Path) -> Result<()> {
5209 if !path.exists() {
5210 bail!("source checkout is missing: {}", path.display());
5211 }
5212 let status = source_checkout_status_for_source(source.name.as_str(), path)
5213 .with_context(|| format!("read status for {}", path.display()))?;
5214 if !status.trim().is_empty() {
5215 bail!(
5216 "source checkout {} ({}) has uncommitted changes; preserve them before fetching pins",
5217 path.display(),
5218 source.name
5219 );
5220 }
5221 Ok(())
5222}
5223
5224fn load_sources_manifest() -> Result<SourcesManifest> {
5225 let path = Path::new("assets/sources.toml");

Callers 1

fetch_pinned_sourcesFunction · 0.85

Calls 1

Tested by

no test coverage detected