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

Function record_modified_file

atomic-core/src/record/workflow/record/mod.rs:491–513  ·  view source on GitHub ↗
(
    working_copy: &W,
    detected: &DetectedFile,
    old_content: &[u8],
    crdt_old_content: Option<&[u8]>,
    options: &RecordingOptions,
    existing_trunk_id: Option<TrunkId>,
    existing_b

Source from the content-addressed store, hash-verified

489/// placeholders and the CRDT layer is effectively insert-only.
490#[allow(clippy::type_complexity)]
491pub fn record_modified_file<W>(
492 working_copy: &W,
493 detected: &DetectedFile,
494 old_content: &[u8],
495 crdt_old_content: Option<&[u8]>,
496 options: &RecordingOptions,
497 existing_trunk_id: Option<TrunkId>,
498 existing_branches: Option<&[BranchId]>,
499) -> Result<RecordedFile, String>
500where
501 W: WorkingCopyRead,
502{
503 record_modified_file_with_semantics(
504 working_copy,
505 detected,
506 old_content,
507 crdt_old_content,
508 options,
509 existing_trunk_id,
510 existing_branches,
511 true,
512 )
513}
514
515#[allow(clippy::too_many_arguments)]
516fn record_modified_file_with_semantics<W: WorkingCopyRead>(