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

Method materialize_paths

atomic-repository/src/repository/materialize.rs:1164–1171  ·  view source on GitHub ↗

Materialize only specific files to the working copy. This is used after `insert` operations to only rewrite files that were actually affected by the inserted changes, avoiding a full rematerialization of the entire working copy. Returns the set of `(path, content_hash)` pairs for files that were written, enabling the caller to update FILE_INDEX without re-reading from disk.

(
        &self,
        working_copy: WorkingCopyId,
        paths: std::collections::HashSet<String>,
    )

Source from the content-addressed store, hash-verified

1162 /// written, enabling the caller to update FILE_INDEX without re-reading
1163 /// from disk.
1164 pub fn materialize_paths(
1165 &self,
1166 working_copy: WorkingCopyId,
1167 paths: std::collections::HashSet<String>,
1168 ) -> Result<MaterializeResult, RepositoryError> {
1169 self.validate_working_copy(working_copy)?;
1170 self.materialize_parallel(working_copy, Some(paths))
1171 }
1172
1173 /// Sequentially materialize a specific set of paths.
1174 pub fn materialize_paths_sequential(

Callers

nothing calls this directly

Calls 2

validate_working_copyMethod · 0.80
materialize_parallelMethod · 0.45

Tested by

no test coverage detected