[−][src]Struct memora::git::Repo
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]
&'a self,
objects: &'a HashSet<Object<'a>>
) -> Result<&'a Object>
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]
&'a self,
objects: &'a HashSet<Object<'a>>
) -> Result<&'a Object>
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]
&'a self,
objects: &'a HashSet<Object<'a>>
) -> Result<Object<'a>>
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]
fn hash<__H>(&self, __state: &mut __H) where
__H: Hasher,
[src]
__H: Hasher,
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,