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

Method output_conflict_marker

atomic-core/src/output/traits.rs:680–706  ·  view source on GitHub ↗
(
        &mut self,
        marker: &str,
        id: usize,
        changes: Option<&[Hash]>,
    )

Source from the content-addressed store, hash-verified

678 }
679
680 fn output_conflict_marker(
681 &mut self,
682 marker: &str,
683 id: usize,
684 changes: Option<&[Hash]>,
685 ) -> Result<(), std::io::Error> {
686 // Ensure we're on a new line
687 if !self.at_newline {
688 self.writer.write_all(b"\n")?;
689 }
690
691 // Write marker and ID
692 write!(self.writer, "{} {}", marker, id)?;
693
694 // Write change hashes if provided
695 if let Some(hashes) = changes {
696 for hash in hashes {
697 let b32 = hash.to_base32();
698 let short = if b32.len() >= 8 { &b32[..8] } else { &b32 };
699 write!(self.writer, " [{}]", short)?;
700 }
701 }
702
703 self.writer.write_all(b"\n")?;
704 self.at_newline = true;
705 Ok(())
706 }
707}
708
709// TESTS

Callers 8

begin_conflictMethod · 0.45
begin_zombie_conflictMethod · 0.45
begin_cyclic_conflictMethod · 0.45
conflict_nextMethod · 0.45
end_conflictMethod · 0.45
end_cyclic_conflictMethod · 0.45

Calls 2

to_base32Method · 0.45
lenMethod · 0.45