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

Method materialize

atomic-repository/src/repository/materialize.rs:1142–1151  ·  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

1140 /// }
1141 /// ```
1142 pub fn materialize(
1143 &self,
1144 working_copy: WorkingCopyId,
1145 ) -> Result<MaterializeResult, RepositoryError> {
1146 self.validate_working_copy(working_copy)?;
1147 // Use the parallel path — buffers content in memory, processes files
1148 // concurrently via rayon, writes each file in a single fs::write call,
1149 // and computes content hashes in-memory (no read-back pass).
1150 self.materialize_parallel(working_copy, None)
1151 }
1152
1153 /// Sequential materialize fallback.
1154 ///

Callers

nothing calls this directly

Calls 2

validate_working_copyMethod · 0.80
materialize_parallelMethod · 0.45

Tested by

no test coverage detected