[][src]Struct memora::git::Repo

pub struct Repo {
    pub path: PathBuf,
    // some fields omitted
}

A Git repository.

Fields

path: PathBuf

Implementations

impl Repo[src]

pub fn new(path: PathBuf) -> Repo[src]

Creates a Repo object for a path.

pub fn cmd(&self, cmd: &str) -> Command[src]

Creates a Git command on this repository.

pub fn cmd_output(&self, params: &[&str]) -> Option<String>[src]

Returns the standard output of a Git command on this repository if the command succeeds. Returns None if the command completes with non-zero exit code.

pub fn last_commit_on_path(&self, path: &Path) -> Option<Object>[src]

Returns the last commit modifying path. Returns None if there is no such commit.

pub fn youngest_object<'a>(
    &'a self,
    objects: &'a HashSet<Object<'a>>
) -> Result<&'a Object>
[src]

Returns the youngest (= furthest from root) of a set of objects. Returns an error if the set is empty or any two of the objects are incomparable.

pub fn oldest_object<'a>(
    &'a self,
    objects: &'a HashSet<Object<'a>>
) -> Result<&'a Object>
[src]

Returns the oldest (= closest to root) of a set of objects. Returns an error if the set is empty or any of two of the objects are incomparable.

pub fn oldest_common_descendant_on_current_branch<'a>(
    &'a self,
    objects: &'a HashSet<Object<'a>>
) -> Result<Object<'a>>
[src]

Determine the oldest common descendant of a set of objects on the current branch. Returns an error if any two of the objects do not have a common descendant.

Trait Implementations

impl Debug for Repo[src]

impl Eq for Repo[src]

impl Hash for Repo[src]

impl PartialEq<Repo> for Repo[src]

Auto Trait Implementations

impl !RefUnwindSafe for Repo

impl Send for Repo

impl !Sync for Repo

impl Unpin for Repo

impl UnwindSafe for Repo

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.