Struct git_protocol::fetch::Arguments
source · [−]pub struct Arguments { /* private fields */ }
blocking-client
or async-client
only.Expand description
The arguments passed to a server command.
Implementations
sourceimpl Arguments
impl Arguments
sourcepub fn can_use_filter(&self) -> bool
pub fn can_use_filter(&self) -> bool
Return true if ref filters is supported.
sourcepub fn can_use_shallow(&self) -> bool
pub fn can_use_shallow(&self) -> bool
Return true if shallow refs are supported.
This is relevant for partial clones when using --depth X
.
sourcepub fn can_use_deepen(&self) -> bool
pub fn can_use_deepen(&self) -> bool
Return true if the ‘deepen’ capability is supported.
This is relevant for partial clones when using --depth X
and retrieving additional history.
sourcepub fn can_use_deepen_since(&self) -> bool
pub fn can_use_deepen_since(&self) -> bool
Return true if the ‘deepen_since’ capability is supported.
This is relevant for partial clones when using --depth X
and retrieving additional history
based on a date beyond which all history should be present.
sourcepub fn can_use_deepen_not(&self) -> bool
pub fn can_use_deepen_not(&self) -> bool
Return true if the ‘deepen_not’ capability is supported.
This is relevant for partial clones when using --depth X
.
sourcepub fn can_use_deepen_relative(&self) -> bool
pub fn can_use_deepen_relative(&self) -> bool
Return true if the ‘deepen_relative’ capability is supported.
This is relevant for partial clones when using --depth X
.
sourcepub fn can_use_ref_in_want(&self) -> bool
pub fn can_use_ref_in_want(&self) -> bool
Return true if the ‘ref-in-want’ capability is supported.
This can be used to bypass ‘ls-refs’ entirely in protocol v2.
sourcepub fn want(&mut self, id: impl AsRef<oid>)
pub fn want(&mut self, id: impl AsRef<oid>)
Add the given id
pointing to a commit to the ‘want’ list.
As such it should be included in the server response as it’s not present on the client.
sourcepub fn want_ref(&mut self, ref_path: &BStr)
pub fn want_ref(&mut self, ref_path: &BStr)
Add the given ref to the ‘want-ref’ list.
The server should respond with a corresponding ‘wanted-refs’ section if it will include the wanted ref in the packfile response.
sourcepub fn have(&mut self, id: impl AsRef<oid>)
pub fn have(&mut self, id: impl AsRef<oid>)
Add the given id
pointing to a commit to the ‘have’ list.
As such it should not be included in the server response as it’s already present on the client.
sourcepub fn shallow(&mut self, id: impl AsRef<oid>)
pub fn shallow(&mut self, id: impl AsRef<oid>)
Add the given id
pointing to a commit to the ‘shallow’ list.
sourcepub fn deepen_since(&mut self, seconds_since_unix_epoch: usize)
pub fn deepen_since(&mut self, seconds_since_unix_epoch: usize)
Deepen the commit history to include all commits from now to seconds_since_unix_epoch
.
sourcepub fn deepen_relative(&mut self)
pub fn deepen_relative(&mut self)
Deepen the commit history in a relative instead of absolute fashion.
sourcepub fn deepen_not(&mut self, ref_path: &BStr)
pub fn deepen_not(&mut self, ref_path: &BStr)
Do not include commits reachable by the given ref_path
when deepening the history.