[−][src]Struct mhgit::commands::CommitOptions
git commit
command.
use mhgit::{CommandOptions, Repository}; use mhgit::commands::CommitOptions; let repo = Repository::new(); CommitOptions::new() .amend(true) .file("foo.txt") .message("Initial commit") .run(&repo)?;
Implementations
impl CommitOptions
[src]
pub fn new() -> CommitOptions
[src]
Create a new set of git commit
options.
pub fn all(&mut self, val: bool) -> &mut CommitOptions
[src]
Add --all options.
pub fn allow_empty(&mut self, val: bool) -> &mut CommitOptions
[src]
Add --allow-empty option.
pub fn amend(&mut self, val: bool) -> &mut CommitOptions
[src]
Add --amend option.
pub fn file(&mut self, file: impl ToString) -> &mut CommitOptions
[src]
Add file to commit command.
pub fn files<I, S>(&mut self, files: I) -> &mut CommitOptions where
I: IntoIterator<Item = S>,
S: ToString,
[src]
I: IntoIterator<Item = S>,
S: ToString,
Add multiple files to commit command.
pub fn message(&mut self, msg: &str) -> &mut CommitOptions
[src]
Set commit message.
Trait Implementations
impl CommandOptions for CommitOptions
[src]
type Output = ()
fn git_args(&self) -> Vec<&str>
[src]
fn parse_output(&self, out: &str) -> Result<Self::Output, Error>
[src]
fn run(&self, repo: &Repository) -> Result<Self::Output, Error>
[src]
impl Debug for CommitOptions
[src]
impl Default for CommitOptions
[src]
fn default() -> CommitOptions
[src]
Auto Trait Implementations
impl RefUnwindSafe for CommitOptions
impl Send for CommitOptions
impl Sync for CommitOptions
impl Unpin for CommitOptions
impl UnwindSafe for CommitOptions
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,
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, 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.
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>,