Skip to main content

GitCommands

Trait GitCommands 

Source
pub trait GitCommands {
    type Error: StdError + Send + Sync + 'static;

    // Required methods
    fn authoritative_head(
        &self,
        repository: &Path,
        branch: &str,
    ) -> Result<String, Self::Error>;
    fn create_tag(
        &self,
        repository: &Path,
        tag: &str,
        commit: &str,
        author: Author<'_>,
    ) -> Result<(), Self::Error>;
    fn push_tag(&self, repository: &Path, tag: &str) -> Result<(), Self::Error>;
}
Expand description

Repository operations used by the release lifecycle.

Required Associated Types§

Source

type Error: StdError + Send + Sync + 'static

The failure of a tag or authority operation.

Required Methods§

Source

fn authoritative_head( &self, repository: &Path, branch: &str, ) -> Result<String, Self::Error>

Commit branch points at now.

Source

fn create_tag( &self, repository: &Path, tag: &str, commit: &str, author: Author<'_>, ) -> Result<(), Self::Error>

Create an annotated tag on commit locally, tagged by author.

Source

fn push_tag(&self, repository: &Path, tag: &str) -> Result<(), Self::Error>

Push a local tag to origin.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§