pub struct Repo(/* private fields */);Expand description
Git repo.
Implementations§
Source§impl Repo
impl Repo
Sourcepub fn open() -> Result<Self, RepoOpenError>
pub fn open() -> Result<Self, RepoOpenError>
Get a Repo for the current directory.
This will fail if the current directory does not contain a
.git subdirectory.
Sourcepub fn open_path<P>(path: P) -> Result<Self, RepoOpenError>
pub fn open_path<P>(path: P) -> Result<Self, RepoOpenError>
Get a Repo for the given path.
This will fail if the path does not contain a .git
subdirectory.
Sourcepub fn get_commit_message_body(
&self,
commit_sha: &str,
) -> Result<String, RunCommandError>
pub fn get_commit_message_body( &self, commit_sha: &str, ) -> Result<String, RunCommandError>
Get the subject of the commit message for the given commit.
Sourcepub fn get_commit_message_subject(
&self,
commit_sha: &str,
) -> Result<String, RunCommandError>
pub fn get_commit_message_subject( &self, commit_sha: &str, ) -> Result<String, RunCommandError>
Get the subject of the commit message for the given commit.
Fetch git tags from the remote.
Sourcepub fn does_git_tag_exist(&self, tag: &str) -> Result<bool, RunCommandError>
pub fn does_git_tag_exist(&self, tag: &str) -> Result<bool, RunCommandError>
Check if a git tag exists locally.
All git tags were fetched at the start of auto-release, so checking locally is sufficient.
Sourcepub fn make_and_push_git_tag(
&self,
tag: &str,
commit_sha: &str,
) -> Result<(), RunCommandError>
pub fn make_and_push_git_tag( &self, tag: &str, commit_sha: &str, ) -> Result<(), RunCommandError>
Create a git tag locally and push it.
Trait Implementations§
Source§impl Ord for Repo
impl Ord for Repo
Source§impl PartialOrd for Repo
impl PartialOrd for Repo
impl Eq for Repo
impl StructuralPartialEq for Repo
Auto Trait Implementations§
impl Freeze for Repo
impl RefUnwindSafe for Repo
impl Send for Repo
impl Sync for Repo
impl Unpin for Repo
impl UnwindSafe for Repo
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