Expand description
An abstraction over fetching a pack from the server.
Generally, there is the following order of operations.
- create a
Transport
- perform a
handshake()
- execute a
Command
- list references
- create a mapping between refspecs and references
- receive a pack
- list references
§Feature Flags
§_Mutually exclusive client _
The client portion of the protocol uses gix-transport
to communicate to a server. For it to be available, one of the following features must
be selected.
Specifying both causes a compile error, preventing the use of --all-features
.
blocking-client
— If set, blocking command implementations are available and will use the blocking version of thegix-transport
crate.async-client
— As above, but provides async implementations instead.handshake
— Add implementations for performing ahandshake
along with the dependencies needed for it.fetch
— Add implementations for performing afetch
(for packs) along with the dependencies needed for it.
§Other
serde
— Data structures implementserde::Serialize
andserde::Deserialize
.
Re-exports§
pub use gix_credentials as credentials;
handshake
pub use gix_transport as transport;
pub use maybe_async;
Modules§
- command
- V2 command abstraction to validate invocations and arguments, like a database of what we know about them.
- fetch
- handshake
- ls_refs
Structs§
- Remote
Progress - The information usually found in remote progress messages as sent by a git server during fetch, clone and push operations.
- Send
Flush OnDrop blocking-client
orasync-client
- A utility to automatically send a flush packet when the instance is dropped, assuring a graceful termination of any interaction with the server.
Enums§
- Command
- A selector for V2 commands to invoke on the server for purpose of pre-invocation validation.
Functions§
- agent
- The name of the
git
client in a format suitable for presentation to agit
server, usingname
as user-defined portion of the value. - fetch
( blocking-client
orasync-client
) andfetch
- Perform one fetch operation, relying on a
transport
.negotiate
is used to run the negotiation of objects that should be contained in the pack, if one is to be received.progress
andshould_interrupt
is passed to all potentially long-running parts of the operation. - handshake
( blocking-client
orasync-client
) andhandshake
- Perform a handshake with the server on the other side of
transport
, withauthenticate
being used if authentication turns out to be required.extra_parameters
are the parameters(name, optional value)
to add to the handshake, each time it is performed in case authentication is required.progress
is used to inform about what’s currently happening. - indicate_
end_ of_ interaction blocking-client
orasync-client
- Send a message to indicate the remote side that there is nothing more to expect from us, indicating a graceful shutdown.
If
trace
istrue
, all packetlines received or sent will be passed to the facilities of thegix-trace
crate. - ls_refs
blocking-client
orasync-client
- Invoke an ls-refs V2 command on
transport
, which requires a prior handshake that yielded servercapabilities
.prepare_ls_refs(capabilities, arguments, features)
can be used to alter the ls-refs.progress
is used to provide feedback. Note thatprepare_ls_refs()
is expected to add the(agent, Some(name))
to the list offeatures
. Iftrace
istrue
, all packetlines received or sent will be passed to the facilities of thegix-trace
crate.
Type Aliases§
- Authenticate
Fn handshake
- A function that performs a given credential action, trying to obtain credentials for an operation that needs it.