pub struct RefMap {
pub mappings: Vec<Mapping>,
pub refspecs: Vec<RefSpec>,
pub extra_refspecs: Vec<RefSpec>,
pub fixes: Vec<Fix>,
pub remote_refs: Vec<Ref>,
pub object_hash: Kind,
}fetch only.Expand description
Information about the relationship between our refspecs, and remote references with their local counterparts.
It’s the first stage that offers connection to the server, and is typically required to perform one or more fetch operations.
Fields§
§mappings: Vec<Mapping>A mapping between a remote reference and a local tracking branch.
refspecs: Vec<RefSpec>The explicit refspecs that were supposed to be used for fetching.
Typically, they are configured by the remote and are referred to by
refmap::SpecIndex::ExplicitInRemote in refmap::Mapping.
extra_refspecs: Vec<RefSpec>Refspecs which have been added implicitly due to settings of the remote, usually pre-initialized from
extra_refspecs in RefMap options.
They are referred to by refmap::SpecIndex::Implicit in refmap::Mapping.
They are never persisted nor are they typically presented to the user.
fixes: Vec<Fix>Information about the fixes applied to the mapping due to validation and sanitization.
remote_refs: Vec<Ref>All refs advertised by the remote.
object_hash: KindThe kind of hash used for all data sent by the server, if understood by this client implementation.
It was extracted from the handshake as advertised by the server.
Implementations§
Source§impl RefMap
impl RefMap
Sourcepub fn from_refs(
remote_refs: Vec<Ref>,
capabilities: &Capabilities,
context: Context,
) -> Result<RefMap, Error>
Available on crate features blocking-client or async-client only.
pub fn from_refs( remote_refs: Vec<Ref>, capabilities: &Capabilities, context: Context, ) -> Result<RefMap, Error>
blocking-client or async-client only.Create a ref-map from already obtained remote_refs. Use context to pass in refspecs.
capabilities are used to determine the object format.