pub struct ResolutionMemory { /* private fields */ }Expand description
Previously seen conflict resolutions, keyed by the conflict triple.
Implementations§
Source§impl ResolutionMemory
impl ResolutionMemory
Sourcepub fn key(base: &str, left: &str, right: &str) -> String
pub fn key(base: &str, left: &str, right: &str) -> String
The conflict’s identity: the hash of the canonical serialization
of the (base, left, right) triple, spelled as the
TreeEntry::Conflict those addresses came from. Reusing the
persisted shape’s bytes means the key inherits invariant 3’s
canonicalization for free and cannot drift from the store’s own
identity for the same conflict.
Contents are addressed with default chunker params; a resolution recorded under different params keys differently and simply misses — the memory is an optimization, a miss re-conflicts.
Sourcepub fn from_log(log: &dyn OpLog, store: &dyn ChunkStore) -> Self
pub fn from_log(log: &dyn OpLog, store: &dyn ChunkStore) -> Self
Builds the memory by walking log for head-moving ops whose
commit carries a resolves link, and reading both sides from
store. Anything the store cannot supply is skipped — an
incomplete memory only means fewer recalls.