Struct git2::PushOptions
source · [−]pub struct PushOptions<'cb> { /* private fields */ }
Expand description
Options to control the behavior of a git push.
Implementations
sourceimpl<'cb> PushOptions<'cb>
impl<'cb> PushOptions<'cb>
sourcepub fn new() -> PushOptions<'cb>
pub fn new() -> PushOptions<'cb>
Creates a new blank set of push options
sourcepub fn remote_callbacks(&mut self, cbs: RemoteCallbacks<'cb>) -> &mut Self
pub fn remote_callbacks(&mut self, cbs: RemoteCallbacks<'cb>) -> &mut Self
Set the callbacks to use for the fetch operation.
sourcepub fn proxy_options(&mut self, opts: ProxyOptions<'cb>) -> &mut Self
pub fn proxy_options(&mut self, opts: ProxyOptions<'cb>) -> &mut Self
Set the proxy options to use for the fetch operation.
sourcepub fn packbuilder_parallelism(&mut self, parallel: u32) -> &mut Self
pub fn packbuilder_parallelism(&mut self, parallel: u32) -> &mut Self
If the transport being used to push to the remote requires the creation of a pack file, this controls the number of worker threads used by the packbuilder when creating that pack file to be sent to the remote.
if set to 0 the packbuilder will auto-detect the number of threads to create, and the default value is 1.
sourcepub fn follow_redirects(&mut self, redirect: RemoteRedirect) -> &mut Self
pub fn follow_redirects(&mut self, redirect: RemoteRedirect) -> &mut Self
Set remote redirection settings; whether redirects to another host are permitted.
By default, git will follow a redirect on the initial request
(/info/refs
), but not subsequent requests.
sourcepub fn custom_headers(&mut self, custom_headers: &[&str]) -> &mut Self
pub fn custom_headers(&mut self, custom_headers: &[&str]) -> &mut Self
Set extra headers for this push operation.
Trait Implementations
Auto Trait Implementations
impl<'cb> !RefUnwindSafe for PushOptions<'cb>
impl<'cb> !Send for PushOptions<'cb>
impl<'cb> !Sync for PushOptions<'cb>
impl<'cb> Unpin for PushOptions<'cb>
impl<'cb> !UnwindSafe for PushOptions<'cb>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more