Struct git_cliff_core::repo::Repository
source · pub struct Repository { /* private fields */ }
Available on crate feature
repo
only.Expand description
Wrapper for Repository
type from git2.
Implementations§
source§impl Repository
impl Repository
sourcepub fn commits(
&self,
range: Option<String>,
include_path: Option<Vec<Pattern>>,
exclude_path: Option<Vec<Pattern>>
) -> Result<Vec<Commit<'_>>>
pub fn commits( &self, range: Option<String>, include_path: Option<Vec<Pattern>>, exclude_path: Option<Vec<Pattern>> ) -> Result<Vec<Commit<'_>>>
Parses and returns the commits.
Sorts the commits by their time.
sourcepub fn current_tag(&self) -> Option<String>
pub fn current_tag(&self) -> Option<String>
Returns the current tag.
It is the same as running git describe --tags
sourcepub fn find_commit(&self, id: String) -> Option<Commit<'_>>
pub fn find_commit(&self, id: String) -> Option<Commit<'_>>
Returns the commit object of the given ID.
Parses and returns a commit-tag map.
It collects lightweight and annotated tags.
sourcepub fn upstream_remote(&self) -> Result<Remote>
pub fn upstream_remote(&self) -> Result<Remote>
Returns the remote of the upstream repository.
The strategy used here is the following:
Find the branch that HEAD points to, and read the remote configured for that branch returns the remote and the name of the local branch.
Auto Trait Implementations§
impl Freeze for Repository
impl RefUnwindSafe for Repository
impl Send for Repository
impl !Sync for Repository
impl Unpin for Repository
impl UnwindSafe for Repository
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more