pub struct Git { /* private fields */ }Expand description
§Git
This struct holds a path to some repository. The path does not need to be root directory of that repository.
Implementations§
Source§impl Git
impl Git
Sourcepub fn make<P>(path: Option<P>) -> Result<Self>
pub fn make<P>(path: Option<P>) -> Result<Self>
§Makes new instance
If you don’t provide a path, current directory will be used.
Sourcepub fn path(&self) -> &Path
pub fn path(&self) -> &Path
§Path of this repository
It’s not always the root directory of the repository.
Sourcepub fn new_cmd_for_adding_all_files<F, P>(&self, files: Option<F>) -> Command
pub fn new_cmd_for_adding_all_files<F, P>(&self, files: Option<F>) -> Command
§Makes new command for adding all files
Sourcepub fn new_cmd_for_committing_all_files_with_a_message<S>(
&self,
msg: S,
) -> Command
pub fn new_cmd_for_committing_all_files_with_a_message<S>( &self, msg: S, ) -> Command
§Makes new command for committing all files with a message
Sourcepub fn new_cmd_for_adding_an_annotated_tag_with_a_message<S>(
&self,
tag: &Semver,
msg: S,
) -> Command
pub fn new_cmd_for_adding_an_annotated_tag_with_a_message<S>( &self, tag: &Semver, msg: S, ) -> Command
§Makes new command for adding an annotated tag with a message
Sourcepub fn new_cmd_for_pushing_to_a_remote(&self, remote: &Remote) -> Command
pub fn new_cmd_for_pushing_to_a_remote(&self, remote: &Remote) -> Command
§Makes new command for pushing to a remote
§Makes new command for pushing tags to a remote
Sourcepub fn current_branch(&self) -> Result<String>
pub fn current_branch(&self) -> Result<String>
§Loads current branch
Sourcepub fn find_last_version_with_build_metadata<S>(
&self,
build_metadata: &[Option<S>],
) -> Result<Option<Semver>>
pub fn find_last_version_with_build_metadata<S>( &self, build_metadata: &[Option<S>], ) -> Result<Option<Semver>>
§Finds last version having build metadata in your set
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Git
impl RefUnwindSafe for Git
impl Send for Git
impl Sync for Git
impl Unpin for Git
impl UnwindSafe for Git
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