[−][src]Struct supergit::Commit
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
Auto Trait Implementations
impl RefUnwindSafe for Commit
[src]
impl !Send for Commit
[src]
impl !Sync for Commit
[src]
impl Unpin for Commit
[src]
impl UnwindSafe for Commit
[src]
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,
pub 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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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.
pub 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>,