//! commit Operation trait for the commit module (commit access on bare repositories based on gix). use gix::hash::ObjectId; use crate::commit::types::{Commit, CommitList, Signature}; /// Operation trait for the commit module. pub trait CommitOps { fn commit_commit(&self, rev: &str) -> Result; fn commit_by_id(&self, id: &ObjectId) -> Result; fn commit_branch_commit(&self, branch: &str) -> Result; fn commit_tag_commit(&self, tag: &str) -> Result; fn commit_list(&self, limit: u64, skip: u64) -> Result; fn commit_parent_count(&self, id: &ObjectId) -> Result; /// Write a merge commit with the given parents and tree. fn commit_write_merge( &self, parents: Vec, tree_id: ObjectId, message: &str, author: &Signature, committer: &Signature, ) -> Result; /// Write a squash commit with a single parent. fn commit_write_squash( &self, parent: ObjectId, tree_id: ObjectId, message: &str, author: &Signature, committer: &Signature, ) -> Result; }