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

Method empty

atomic-core/src/change/change.rs:210–231  ·  view source on GitHub ↗

Create an empty change with just a header. This is useful as a starting point for building changes.

(header: ChangeHeader)

Source from the content-addressed store, hash-verified

208 ///
209 /// This is useful as a starting point for building changes.
210 pub fn empty(header: ChangeHeader) -> Self {
211 Self {
212 hashed: HashedChange {
213 header,
214 kind: ChangeKind::Durable,
215 supersedes: None,
216 origin: ChangeOrigin::Native,
217 causal_frontier: CausalFrontier::empty(),
218 dependencies: Vec::new(),
219 extra_known: Vec::new(),
220 metadata: Vec::new(),
221 span: None,
222 provenance: Vec::new(),
223 hunks: Vec::new(),
224 file_ops: Vec::new(),
225 contents_hash: Hash::of(&[]),
226 },
227 unhashed: None,
228 signature: None,
229 contents: Vec::new(),
230 }
231 }
232
233 /// Add semantic layer operations to this change.
234 pub fn add_file_ops(&mut self, ops: FileOps) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected