MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / initialize_alternate_index

Function initialize_alternate_index

atomic-repository/src/wip.rs:394–405  ·  view source on GitHub ↗
(
    root: &Path,
    index: &Path,
    parent_oid: Option<&str>,
)

Source from the content-addressed store, hash-verified

392}
393
394fn initialize_alternate_index(
395 root: &Path,
396 index: &Path,
397 parent_oid: Option<&str>,
398) -> Result<(), WipCaptureError> {
399 let args = match parent_oid {
400 Some(parent_oid) => vec![OsString::from("read-tree"), OsString::from(parent_oid)],
401 None => os_args(&["read-tree", "--empty"]),
402 };
403 git_bytes(root, "initialize alternate index", &args, Some(index), None)?;
404 Ok(())
405}
406
407fn update_alternate_index(
408 root: &Path,

Callers 1

prepare_tracked_wipFunction · 0.85

Calls 2

os_argsFunction · 0.85
git_bytesFunction · 0.85

Tested by

no test coverage detected