[][src]Struct supergit::Commit

pub struct Commit {
    pub id: HashId,
    // some fields omitted
}

Represent a commit on a repository

When creating a commit object, it is guaranteed that it exists in the repository.

Fields

id: HashId

Implementations

impl Commit[src]

pub fn id_str(&self) -> String[src]

Get a utf-8 string representation of the commit ID

pub fn summary(&self) -> String[src]

Get the summary line as a utf-8 string

pub fn parent_count(&self) -> usize[src]

Get the number of parents

pub fn first_parent(&self) -> Option<Self>[src]

Return the first parent, if it exists

pub fn parent(&self, num: usize) -> Option<Self>[src]

Get a specific parent, if it exists

pub fn parents(&self) -> Vec<Commit>[src]

Get the set of parents as a vector

Use this function if you suspect a commit has more than one parent.

pub fn tree(&self) -> FileTree[src]

Get the file tree for this commit

pub fn get_paths(&self) -> Vec<String>[src]

Get the list of paths in the repository touched by this commit

Using this function directly is often not what you want. Instead, use the get_history(...) function on FileTree, which uses this function.

Trait Implementations

impl Clone for Commit[src]

impl Debug for Commit[src]

Auto Trait Implementations

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.