pub trait Writer {
// Required method
fn write_reference(
&self,
reference: &Namespaced<'_>,
commit: Oid,
parent: Option<Oid>,
reflog: String,
) -> Result<(), WriteReference>;
}Expand description
Git reference writer, generally a Git repository, or its corresponding Reference Database (Ref DB).
Required Methods§
Sourcefn write_reference(
&self,
reference: &Namespaced<'_>,
commit: Oid,
parent: Option<Oid>,
reflog: String,
) -> Result<(), WriteReference>
fn write_reference( &self, reference: &Namespaced<'_>, commit: Oid, parent: Option<Oid>, reflog: String, ) -> Result<(), WriteReference>
Write the given commit Oid, and its parent, to the given
reference.
The reflog given can used as the Git reflog message of the reference.
§Concurrency
It is up to the implementer to ensure the safety of writing the reference safely in a concurrent environment.
§Errors
error::WriteReference: failed to write the Git reference.