pub struct PushOptions { /* private fields */ }
Expand description
git push
command.
use mhgit::{CommandOptions, Repository};
use mhgit::commands::PushOptions;
let repo = Repository::new();
PushOptions::new()
.run(&repo)?;
Implementations§
Source§impl PushOptions
impl PushOptions
Sourcepub fn new() -> PushOptions
pub fn new() -> PushOptions
Create a new set of git tag
options.
Sourcepub fn all(&mut self, val: bool) -> &mut PushOptions
pub fn all(&mut self, val: bool) -> &mut PushOptions
Add –all option.
Add –tags option.
Sourcepub fn force(&mut self, val: bool) -> &mut PushOptions
pub fn force(&mut self, val: bool) -> &mut PushOptions
Add –force option.
Sourcepub fn set_upstream(&mut self, val: bool) -> &mut PushOptions
pub fn set_upstream(&mut self, val: bool) -> &mut PushOptions
Add –set-upstream option.
Sourcepub fn refspec(&mut self, file: impl ToString) -> &mut PushOptions
pub fn refspec(&mut self, file: impl ToString) -> &mut PushOptions
Add refspec to push command.
Sourcepub fn refspecs<I, S>(&mut self, files: I) -> &mut PushOptionswhere
I: IntoIterator<Item = S>,
S: ToString,
pub fn refspecs<I, S>(&mut self, files: I) -> &mut PushOptionswhere
I: IntoIterator<Item = S>,
S: ToString,
Add multiple refspecs to push command.
Sourcepub fn remote(&mut self, repo: impl ToString) -> &mut PushOptions
pub fn remote(&mut self, repo: impl ToString) -> &mut PushOptions
Set remote repository source.
Trait Implementations§
Source§impl CommandOptions for PushOptions
impl CommandOptions for PushOptions
Source§impl Debug for PushOptions
impl Debug for PushOptions
Source§impl Default for PushOptions
impl Default for PushOptions
Source§fn default() -> PushOptions
fn default() -> PushOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PushOptions
impl RefUnwindSafe for PushOptions
impl Send for PushOptions
impl Sync for PushOptions
impl Unpin for PushOptions
impl UnwindSafe for PushOptions
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more