[−][src]Struct mhgit::commands::PushOptions
git push
command.
use mhgit::{CommandOptions, Repository}; use mhgit::commands::PushOptions; let repo = Repository::new(); PushOptions::new() .run(&repo)?;
Implementations
impl PushOptions
[src]
pub fn new() -> PushOptions
[src]
Create a new set of git tag
options.
pub fn all(&mut self, val: bool) -> &mut PushOptions
[src]
Add --all option.
pub fn tags(&mut self, val: bool) -> &mut PushOptions
[src]
Add --tags option.
pub fn force(&mut self, val: bool) -> &mut PushOptions
[src]
Add --force option.
pub fn set_upstream(&mut self, val: bool) -> &mut PushOptions
[src]
Add --set-upstream option.
pub fn refspec(&mut self, file: impl ToString) -> &mut PushOptions
[src]
Add refspec to push command.
pub fn refspecs<I, S>(&mut self, files: I) -> &mut PushOptions where
I: IntoIterator<Item = S>,
S: ToString,
[src]
I: IntoIterator<Item = S>,
S: ToString,
Add multiple refspecs to push command.
pub fn remote(&mut self, repo: impl ToString) -> &mut PushOptions
[src]
Set remote repository source.
Trait Implementations
impl CommandOptions for PushOptions
[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 PushOptions
[src]
impl Default for PushOptions
[src]
fn default() -> PushOptions
[src]
Auto Trait Implementations
impl RefUnwindSafe for PushOptions
impl Send for PushOptions
impl Sync for PushOptions
impl Unpin for PushOptions
impl UnwindSafe for PushOptions
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>,