Trait git_ref::transaction::RefEditsExt[][src]

pub trait RefEditsExt<T> where
    T: Borrow<RefEdit> + BorrowMut<RefEdit>, 
{ fn assure_one_name_has_one_edit(&self) -> Result<(), BString>;
fn extend_with_splits_of_symbolic_refs(
        &mut self,
        find: impl FnMut(PartialName<'_>) -> Option<Target>,
        make_entry: impl FnMut(usize, RefEdit) -> T
    ) -> Result<(), Error>;
fn adjust_namespace(&mut self, namespace: Option<Namespace>); fn pre_process(
        &mut self,
        find: impl FnMut(PartialName<'_>) -> Option<Target>,
        make_entry: impl FnMut(usize, RefEdit) -> T,
        namespace: impl Into<Option<Namespace>>
    ) -> Result<(), Error> { ... } }
Expand description

An extension trait to perform commonly used operations on edits across different ref stores.

Required methods

Return true if each ref name has exactly one edit across multiple ref edits

Split all symbolic refs into updates for the symbolic ref as well as all their referents if the deref flag is enabled.

Note no action is performed if deref isn’t specified.

If namespace is not None, alter all edit names by prefixing them with the given namespace. Note that symbolic reference targets will also be rewritten to point into the namespace instead.

Provided methods

All processing steps in one and in the correct order.

Users call this to assure derefs are honored and duplicate checks are done.

Implementations on Foreign Types

Implementors