Skip to main content

CommitHistory

Trait CommitHistory 

Source
pub trait CommitHistory {
    // Required methods
    fn has_commits(&self) -> bool;
    fn recent_commits(
        &self,
        from: &str,
        max: usize,
    ) -> Result<Vec<CommitSummary>, EngineError>;
    fn refs_by_commit(&self) -> HashMap<String, Vec<String>>;
}
Expand description

History browsing for the review-source picker.

Required Methods§

Source

fn has_commits(&self) -> bool

False on an unborn HEAD — there is nothing to diff against.

Source

fn recent_commits( &self, from: &str, max: usize, ) -> Result<Vec<CommitSummary>, EngineError>

The most recent max commits reachable from from, newest first.

Source

fn refs_by_commit(&self) -> HashMap<String, Vec<String>>

Branch/tag/remote names by the COMMIT sha they point at, annotated tags peeled.

Decoration only, so an unreadable ref list costs decoration and never the picker: the adapter returns an empty map rather than an error.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§