···7070// Pending is one started ingest operation awaiting Continue or Discard.
7171//
7272// Exactly one of Continue or Discard may be called.
7373+//
7474+// Labels: MT-Unsafe.
7375type Pending struct {
7476 reader *bufio.Reader
7577 algo objectid.Algorithm
···8183}
82848385// Ingest reads and validates one PACK header, returning one pending operation.
8686+//
8787+// Labels: Deps-Borrowed.
8488func Ingest(
8589 src io.Reader,
8690 algo objectid.Algorithm,
···113117114118// Continue ingests the pack stream into destination and writes pack artifacts.
115119//
116116-// Continue is terminal. Further use of pending is undefined behavior.
120120+// Continue invalidates the receiver.
117121//
118122// Artifacts are published under content-addressed final names derived from the
119123// resulting pack hash. If those final names already exist, Continue treats that
···143147// Discard consumes and verifies one zero-object pack stream without writing
144148// files.
145149//
146146-// Discard is terminal. Further use of pending is undefined behavior.
150150+// Discard invalidates the receiver.
147151func (pending *Pending) Discard() (DiscardResult, error) {
148152 pending.finalized = true
149153