pub struct PullOptions { /* private fields */ }
Expand description
git pull
command.
use mhgit::{CommandOptions, Repository};
use mhgit::commands::PullOptions;
let repo = Repository::new();
PullOptions::new()
.remote("origin")
.refspec("master")
.run(&repo)?;
Implementations§
Source§impl PullOptions
impl PullOptions
Sourcepub fn new() -> PullOptions
pub fn new() -> PullOptions
Create a new set of git pull
options.
Add –allow-unrelated option.
Sourcepub fn refspec(&mut self, file: impl ToString) -> &mut PullOptions
pub fn refspec(&mut self, file: impl ToString) -> &mut PullOptions
Add refspec to pull command.
Sourcepub fn refspecs<I, S>(&mut self, files: I) -> &mut PullOptionswhere
I: IntoIterator<Item = S>,
S: ToString,
pub fn refspecs<I, S>(&mut self, files: I) -> &mut PullOptionswhere
I: IntoIterator<Item = S>,
S: ToString,
Add multiple refspecs to pull command.
Sourcepub fn remote(&mut self, repo: impl ToString) -> &mut PullOptions
pub fn remote(&mut self, repo: impl ToString) -> &mut PullOptions
Set remote repository source.
Trait Implementations§
Source§impl CommandOptions for PullOptions
impl CommandOptions for PullOptions
Source§impl Debug for PullOptions
impl Debug for PullOptions
Source§impl Default for PullOptions
impl Default for PullOptions
Source§fn default() -> PullOptions
fn default() -> PullOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PullOptions
impl RefUnwindSafe for PullOptions
impl Send for PullOptions
impl Sync for PullOptions
impl Unpin for PullOptions
impl UnwindSafe for PullOptions
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