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

Method materialize

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

Materialize the working copy to match its authoritative desired view. This synchronizes the working copy files with the repository graph state recorded for the supplied working-copy identity. Files are created, updated, or deleted to match what's recorded in the view. Since all edges are stored in the global GRAPH table, this uses the raw transaction directly with a change filter to scope which

(
        &self,
        working_copy: WorkingCopyId,
    )

Source from the content-addressed store, hash-verified

1126 /// }
1127 /// ```
1128 pub fn materialize(
1129 &self,
1130 working_copy: WorkingCopyId,
1131 ) -> Result<MaterializeResult, RepositoryError> {
1132 self.validate_working_copy(working_copy)?;
1133 // Use the parallel path — buffers content in memory, processes files
1134 // concurrently via rayon, writes each file in a single fs::write call,
1135 // and computes content hashes in-memory (no read-back pass).
1136 self.materialize_parallel(working_copy, None)
1137 }
1138
1139 /// Sequential materialize fallback.
1140 ///

Callers

nothing calls this directly

Calls 2

validate_working_copyMethod · 0.80
materialize_parallelMethod · 0.45

Tested by

no test coverage detected