pub mod fixtures { use anyhow::Result; use radicle::cob::cache::NoCache; use radicle::patch::{Cache, MergeTarget, PatchMut, Patches}; use radicle::storage::git::Repository; use radicle::test::setup::{BranchWith, NodeWithRepo}; pub fn node_with_repo() -> NodeWithRepo { NodeWithRepo::default() } pub fn branch(node: &NodeWithRepo) -> BranchWith { let checkout = node.repo.checkout(); checkout.branch_with([("README", b"Hello World!")]) } pub fn patch<'a, 'g>( node: &'a NodeWithRepo, branch: &BranchWith, patches: &'a mut Cache, NoCache>, ) -> Result> { let patch = patches.create( "My first patch", "Blah blah blah.", MergeTarget::Delegates, branch.base, branch.oid, &[], &node.signer, )?; Ok(patch) } }