Struct git2::PushOptions
source · pub struct PushOptions<'cb> { /* private fields */ }
Expand description
Options to control the behavior of a git push.
Implementations§
source§impl<'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 push 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 push 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.