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

Function ctx

atomic-core/src/record/workflow/recipes/detector.rs:122–136  ·  view source on GitHub ↗
(
        old: &'a [u8],
        new: &'a [u8],
        existing: Option<&'a [crate::crdt::BranchId]>,
    )

Source from the content-addressed store, hash-verified

120 use crate::diff::Algorithm;
121
122 fn ctx<'a>(
123 old: &'a [u8],
124 new: &'a [u8],
125 existing: Option<&'a [crate::crdt::BranchId]>,
126 ) -> RecipeContext<'a> {
127 RecipeContext {
128 path: "test.txt",
129 old_content: old,
130 new_content: new,
131 existing_branches: existing,
132 existing_trunk_id: None,
133 encoding: Encoding::Utf8,
134 algorithm: Algorithm::Myers,
135 }
136 }
137
138 #[test]
139 fn empty_existing_branches_falls_back_to_in_place_edit() {

Calls

no outgoing calls