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

Method record_conflict

atomic-core/src/output/repo/writer.rs:328–338  ·  view source on GitHub ↗

Record a conflict with the given type.

(&mut self, conflict_type: FileConflictType, id: u32, hash: Option<&Hash>)

Source from the content-addressed store, hash-verified

326
327 /// Record a conflict with the given type.
328 fn record_conflict(&mut self, conflict_type: FileConflictType, id: u32, hash: Option<&Hash>) {
329 let mut conflict = FileConflict::new(self.path.clone(), conflict_type)
330 .at_line(self.line)
331 .with_id(id);
332
333 if let Some(h) = hash {
334 conflict = conflict.with_change(*h);
335 }
336
337 self.conflicts.push(conflict);
338 }
339}
340
341/// Count the number of digits in a u32.

Callers 3

begin_conflictMethod · 0.80
begin_zombie_conflictMethod · 0.80
begin_cyclic_conflictMethod · 0.80

Calls 5

with_idMethod · 0.80
at_lineMethod · 0.80
cloneMethod · 0.45
with_changeMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected