Module negotiate

Source
Available on crate feature fetch only.
Expand description

A modules with primitives to perform negotiation as part of a fetch operation.

The functions provided are called in a certain order:

  1. mark_complete_and_common_ref() - initialize the negotiator with all state known on the remote.
  2. add_wants() is called if the call at 1) returned Action::MustNegotiate.
  3. one_round() is called for each negotiation round, providing information if the negotiation is done.

Modules§

one_round

Structs§

Round
Key information about each round in the pack-negotiation, as produced by one_round().

Enums§

Action
Determines what should be done after preparing the commit-graph for negotiation.
Error
The error returned during one_round() or mark_complete_and_common_ref().

Functions§

add_wants
Add all ‘wants’ to arguments once it’s known negotiation is necessary.
make_refmapping_ignore_predicate
Create a predicate that checks if a refspec mapping should be ignored.
mark_complete_and_common_ref
This function is modeled after the similarly named one in the git codebase to mark known refs in a commit-graph.
one_round
Prepare to negotiate a single round in the process of letting the remote know what we have, and have in common.