pub struct FetchOptions<'cb> { /* private fields */ }
Expand description
Options which can be specified to various fetch operations.
Implementations§
Source§impl<'cb> FetchOptions<'cb>
impl<'cb> FetchOptions<'cb>
Sourcepub fn new() -> FetchOptions<'cb>
pub fn new() -> FetchOptions<'cb>
Creates a new blank set of fetch 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 prune(&mut self, prune: FetchPrune) -> &mut Self
pub fn prune(&mut self, prune: FetchPrune) -> &mut Self
Set whether to perform a prune after the fetch.
Sourcepub fn update_fetchhead(&mut self, update: bool) -> &mut Self
pub fn update_fetchhead(&mut self, update: bool) -> &mut Self
Set whether to write the results to FETCH_HEAD.
Defaults to true
.
Sourcepub fn report_unchanged(&mut self, update: bool) -> &mut Self
pub fn report_unchanged(&mut self, update: bool) -> &mut Self
Set whether to report unchanged tips in the update_tips callback.
Defaults to false
.
Sourcepub fn depth(&mut self, depth: i32) -> &mut Self
pub fn depth(&mut self, depth: i32) -> &mut Self
Set fetch depth, a value less or equal to 0 is interpreted as pull everything (effectively the same as not declaring a limit depth).
Set how to behave regarding tags on the remote, such as auto-downloading tags for objects we’re downloading or downloading all of them.
The default is to auto-follow tags.
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 fetch operation.