[][src]Struct mhgit::commands::CommitOptions

pub struct CommitOptions { /* fields omitted */ }

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]

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 = ()

impl Debug for CommitOptions[src]

impl Default for CommitOptions[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.