Expand description
Receive-pack wire handling. The host authenticates requests, quarantines objects, resolves deltas, validates graph/ref updates, and publishes them. This module never acknowledges a push or changes refs on its own.
Structs§
- Advertisement
- Incremental advertisement for hosts whose stable ref projection lives in
external storage.
previousretains only the last name, never the ref set. - Ancestry
- The host queues distinct commits, starting at the proposed tip, and follows only parent edges. Queue storage can be paged; no history lives in this value. One visit budget covers every branch update in the receive operation.
- Blob
Checks - Additional policies to apply to the designated blob after resolving its ID.
- Capabilities
- Capabilities offered by a host or selected by a client. Hosts must opt in only when their publication/option/progress handling fulfills the promise.
- Command
- Control
Decoder - Incremental receive-pack control decoding with one caller-owned packet
buffer. Persist each borrowed command/option before calling
readagain. No pack bytes are consumed. Duplicate refs, old-value CAS, fast-forwards, authorization and shallow-update policy are host validation responsibilities. - Control
Progress - Fsck
Attributes - Match Git’s 100 MiB file bound and 2048-byte line bound. As in Git’s attributes fsck, NUL terminates line inspection, while the complete blob length remains subject to the file bound and canonical authentication.
- Fsck
Headers - Additional fsck header policy, independent of structural link decoding. Feed exactly the canonical bytes accepted by the link decoder, then finish. Identity names/emails can be arbitrarily long; this retains only ten prefix bytes and a fixed-size identity state. Missing historical taggers are allowed. This is not a complete fsck implementation; tree and designated-blob policy must be checked separately by the host before publication.
- Fsck
Modules - Validate the settings that strict receive fsck checks in gitmodules. Config syntax errors are warning-only and stop parsing subsequent entries; an unsafe setting parsed before that error remains fatal. Names, values and URL paths are reduced to bounded properties rather than retained strings.
- Limits
- Report
- A report-status/v2 encoder. Success is a host assertion: construct a report only after pack/graph validation and the authoritative publication outcome. Report v2 uses ordinary statuses when refs have not been rewritten by hooks.
- Status
- Detached report encoder for paged ref outcomes in external storage. Every call accepts a new bounded sink. Discard all output after any sink failure.
Enums§
Functions§
- check_
tree_ entry - Add strict receive tree policy after structural link validation. Historical regular-file permissions and attributes symlinks remain warnings. Returned checks apply even when the target blob was published by an earlier request.
- write_
advertisement - Write a smart HTTP receive-pack advertisement from a stable, byte-sorted ref projection. Names are raw Git bytes. The host must discard partial output on an invalid ref or sink failure. Only opt into host-backed features.
- write_
progress - Emit processing messages before the publication outcome is known, without
sending an unpack/ref success status. Quiet and non-sideband clients get
no bytes. The host starts
Reportonly after validation/publication completes.