pub struct ShallowOutcome {
pub boundary: HashSet<ObjectId>,
pub client_boundary: HashSet<ObjectId>,
pub include: HashSet<ObjectId>,
pub newly_shallow: Vec<ObjectId>,
pub unshallow: Vec<ObjectId>,
pub unshallow_parents: Vec<ObjectId>,
}Expand description
What the server decided about the boundary.
Fields§
§boundary: HashSet<ObjectId>Commits the client declared shallow, whose parents are not traversed at all.
client_boundary: HashSet<ObjectId>Where the client’s own history stops, verbatim from its shallow <oid> lines.
Not the same field as boundary and not redundant with it, because the
two bound different walks. boundary bounds the walk that decides what
to send, and a deepening request deliberately walks past the client’s
cut, which is what it asked for. This one bounds the walk over the
client’s haves, which may never walk past the cut: a client that said
shallow X holds X and none of X’s ancestors, so treating a have X as proof it holds them subtracts the whole history from the pack.
include: HashSet<ObjectId>When a deepening was requested, exactly the commits this fetch may send. Empty when the request only declared an existing boundary.
Separate from boundary because a merge can be cut off from one parent
and keep the other (deepen-not does exactly that), and a boundary
cannot express it.
newly_shallow: Vec<ObjectId>shallow <oid> lines to send: new cut points the client does not know.
unshallow: Vec<ObjectId>unshallow <oid> lines to send: commits that used to be cut and are
now complete because this fetch sends their parents.
unshallow_parents: Vec<ObjectId>The parents of every commit in unshallow: extra tips the pack walk
must start from.
An unshallow <oid> line is a promise that the pack carries that
commit’s parents, and the wants alone cannot deliver it. The client
offers its shallow tip as a have in the very same request, so the tip
is correctly excluded from the pack, and a walk seeded only with the
wants stops there and sends nothing, having already promised otherwise.
Seeding the parents is how git-upload-pack closes the same gap (see
send_unshallow in its upload-pack.c).