pub struct GitCommit;
Expand description
Git commit functionality
Implementations§
Source§impl GitCommit
impl GitCommit
Sourcepub fn is_git_repository() -> Result<bool>
pub fn is_git_repository() -> Result<bool>
Check if we’re in a Git repository
Sourcepub fn format_message(emoji_code: &str, message: &str) -> String
pub fn format_message(emoji_code: &str, message: &str) -> String
Format a commit message with emoji
Sourcepub fn commit(message: &str, dry_run: bool) -> Result<String>
pub fn commit(message: &str, dry_run: bool) -> Result<String>
Execute git commit with the formatted message
Sourcepub fn has_staged_changes() -> Result<bool>
pub fn has_staged_changes() -> Result<bool>
Check if there are staged changes to commit
Auto Trait Implementations§
impl Freeze for GitCommit
impl RefUnwindSafe for GitCommit
impl Send for GitCommit
impl Sync for GitCommit
impl Unpin for GitCommit
impl UnwindSafe for GitCommit
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