Trait GitCommand

Source
pub trait GitCommand: Command {
    // Provided methods
    fn validate_git_repo(&self) -> Result<()> { ... }
    fn repo_root(&self) -> Result<String> { ... }
    fn current_branch(&self) -> Result<String> { ... }
}
Expand description

Trait for commands that work with git repositories

Provided Methods§

Source

fn validate_git_repo(&self) -> Result<()>

Validate that we’re in a git repository

Source

fn repo_root(&self) -> Result<String>

Get the repository root path

Source

fn current_branch(&self) -> Result<String>

Get the current branch

Implementors§