Struct gitoxide_core::pack::receive::Arguments
pub struct Arguments { /* private fields */ }
async-client
or blocking-client
only.Expand description
The arguments passed to a server command.
Implementations§
§impl Arguments
impl Arguments
pub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Return true if there is no argument at all.
This can happen if callers assure that they won’t add ‘wants’ if their ‘have’ is the same, i.e. if the remote has nothing new for them.
pub fn can_use_filter(&self) -> bool
pub fn can_use_filter(&self) -> bool
Return true if ref filters is supported.
pub 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
.
pub 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.
pub 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.
pub 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
.
pub 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
.
pub 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.
pub fn can_use_include_tag(&self) -> bool
pub fn can_use_include_tag(&self) -> bool
Return true if the ‘include-tag’ capability is supported.
pub fn is_stateless(&self, transport_is_stateless: bool) -> bool
pub fn is_stateless(&self, transport_is_stateless: bool) -> bool
Return true if we will use a stateless mode of operation, which can be decided in conjunction with transport_is_stateless
.
- we are always stateless if the transport is stateless, i.e. doesn’t support multiple interactions with a single connection.
- we are always stateless if the protocol version is
2
- otherwise we may be stateful.
pub 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.
pub 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.
pub 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.
pub 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.
pub fn deepen_since(&mut self, seconds: u64)
pub fn deepen_since(&mut self, seconds: u64)
Deepen the commit history to include all commits from now to (and including) seconds
as passed since UNIX epoch.
pub fn deepen_relative(&mut self)
pub fn deepen_relative(&mut self)
Deepen the commit history in a relative instead of absolute fashion.
pub 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.
pub fn use_include_tag(&mut self)
pub fn use_include_tag(&mut self)
Permanently allow the server to include tags that point to commits or objects it would return.
Needs to only be called once.