Expand description
git-remote — callable fetch / push / clone / ls-remote orchestration.
This crate lifts the network-transport orchestration out of the git-cli
monolith so it can be driven as a library (the way a downstream consumer such
as heddle needs). The wire codecs (sley_protocol), the pack encoder
(sley_pack), pack building (sley_odb) and ref/commit plumbing already
live in their own crates; git-remote is the glue that sequences them into
fetch/push/clone/ls-remote, with the CLI-specific concerns (argument
parsing, stdout/stderr formatting, exit codes, repository discovery from
process-global state) kept out via the seams below:
CredentialProvider— how authenticated remotes obtain credentials. The caller injects one (e.g. a credential-helper-backed impl, an interactive prompt, orNoCredentialsfor unauthenticated/public access).ProgressSink— where human-facing progress/summary lines go. The orchestration returns structured outcomes and emits progress through this sink instead of printing, so the caller controls presentation.
The lift proceeds in stages (see docs/git-remote-extraction.md); this is
the scaffold (stage A).
Structs§
- AddRemote
Options - AddRemote
Outcome - Bundle
UriEntry - Bundle
UriList - Clone
Options - The clone inputs the library needs for the branch-tracking flow, all resolved
by the caller. The remaining
git cloneknobs (bare/mirror,--revision, templates, config overrides, sparse, separate-git-dir, etc.) stay in the CLI: the unsupported ones are gated beforecloneis called, and the config-writing ones run inside theconfigure/configure_branchcallbacks. - Clone
Outcome - The structured result of a
clone. - Clone
Request - Fully resolved inputs for a
clonerun. - Clone
Services - Mutable seams used while cloning.
- Credential
Helper Provider - The default
CredentialProvider: fills and stores credentials viacredential.helperprograms. - Discovered
Remote Helper Fetch Operation - Fetch inputs used after a live helper has already negotiated capabilities, refs, and object format during clone bootstrap.
- Fetch
Bundle Request - Fully resolved inputs for a
fetch_bundlerun. - Fetch
Options - Controls for a
fetchrun, mirroring thegit fetchflags the CLI parses. - Fetch
Outcome - The structured result of a
fetch. - Fetch
Repository Plan - Repository-derived defaults for one fetch invocation.
- Fetch
Request - Fully resolved inputs for a
fetchrun. - Fetch
Services - Mutable seams used while fetching.
- GitFetch
Pack Request - Http
Backend Plan - A validated native smart-HTTP operation.
- Http
Backend Request - Environment-derived input to
plan_http_backend_request. - Http
Fetch Pack Request - Fetch
wantsfrom an HTTP upload-pack remote into the repository atgit_dir, installing the resulting pack. Objects already present locally are skipped (for non-shallow fetches);promisorselects promisor-pack installation. - Http
Operation Batch - Reusable HTTP client for every smart-HTTP RPC in one remote operation.
- Http
Response - A buffered HTTP response whose body streams directly from the network.
- Http
Service Advertisements - Result of smart-HTTP service discovery: parsed ref advertisements plus the protocol v2 handshake when the server negotiated v2 on the info/refs exchange.
- Http
Upload Pack Discovery - Upload-pack discovery for a repository whose object format is not known yet.
- Local
Deepen Plan - The in-process upload-pack’s plan for a
deepen(shallow) local fetch: whichshallow/unshallowupdates to report, which commits the pack walk must stop at, and which extra tips become packable because the client’s boundary moved. - LsRemote
Filter - The ref-class filters that select which advertised refs to keep, mirroring the
git ls-remoteflags the CLI parses. - LsRemote
Outcome - Structured advertisement result for embedders.
- LsRemote
Record - One advertised ref returned by
ls_remote— what the CLI prints as a<oid>\t<name>line (with an optional precedingref: <symref>\t<name>line when--symrefis set andsymrefis present). - LsRemote
Request - Fully resolved inputs for an advertisement listing.
- NoCredentials
- A
CredentialProviderthat never supplies credentials, so every request is attempted unauthenticated. This is what an embedder targeting public remotes (e.g. heddle) uses to suppress prompts. - Pack
Generation Progress - Equal-work counts for one pack generated natively by Sley.
- Proc
Receive RefPattern - One configured
receive.procReceiveRefspattern. - Proc
Receive Report - Per-command proc-receive state carried through receive-pack execution.
- Promisor
Remote Decision - Promisor
Remote Field Update - Prune
Refs Input - Prune refs whose destinations are covered by the active fetch refspecs and
whose corresponding remote sources are absent from
advertisements, deleting them and emitting git’s notice lines throughprogress(unlessquiet). Returns the refs that were pruned. - Pruned
Ref - A remote-tracking ref removed by a prune pass.
- Push
Action Plan - A caller-authored push plan. This is distinct from
PushPlan, which is a negotiated, executable transport token returned byplan_push. - Push
Action Request - Fully resolved inputs for a caller-authored exact push plan.
- Push
Command - One caller-authored receive-pack command.
- Push
Options - Controls for a
pushrun, mirroring thegit pushflags the CLI parses that affect the wire/planning behavior the library owns. - Push
Outcome - The structured result of a
push. - Push
Pack Request - Inputs for building a push packfile or full receive-pack request body.
- Push
Plan - A push after ref negotiation and command planning, but before any ref update is sent or applied.
- Push
Quarantine - Disposable object directory used to expose incoming local-push objects to receive-side hooks without making them part of the destination repository.
- Push
Report Ref - One ref’s line in git’s push status report. Carries everything
print_one_push_reportneeds: the source (“from”) ref, the destination (“to”) ref, the old/new object ids, whether the update was forced, whether it is a deletion, and the classifiedPushRefStatus. - Push
Report Request - Fully resolved inputs for a status-reporting push to a local repository.
- Push
Request - Fully resolved inputs for a
pushrun. - Push
Services - Mutable seams used while pushing.
- Push
Status Report - The full result of a push as git’s transport layer models it: every ref’s
classified status, ready to be rendered into the
To <url>report and used to decide the process exit code and thepull-before-pushadvice. - Receive
Pack Command State - Receive
Pack Server Options - Receive
Pack Server Outcome - Receive
Pack Server Request - Remote
Head Plan - Remote
Helper Capabilities - Capabilities advertised by a remote helper.
- Remote
Helper Export Request - A runtime request for the fast-export half of a remote-helper push.
- Remote
Helper Fetch Discovery - A live helper after capability and ref discovery, before any import or local object/ref mutation. Clone can finalize its provisional repository’s object format and then continue this same protocol process.
- Remote
Helper Fetch Operation - Fully resolved inputs for a remote-helper fetch.
- Remote
Helper Fetch Request - Final ref bookkeeping for objects installed by a remote helper’s
importstream. The helper owns object transfer; this engine operation deliberately shares Git-compatible refspec planning, FETCH_HEAD, pruning, and reference transactions withfetch. - Remote
Helper Fetch Services - Runtime seams used by a remote-helper fetch.
- Remote
Helper Push Operation - Fully resolved inputs for a remote-helper push.
- Remote
Helper Push Options - Controls for the protocol-affecting portion of a remote-helper push.
- Remote
Helper Push Outcome - Structured result of a successful remote-helper push.
- Remote
Helper Push Services - Runtime seams used by a remote-helper push.
- Remote
Helper Ref - Remote
Helper Session - A live remote-helper process. The caller may inspect capabilities/listing, then consume the session into either an import or export operation.
- Remote
Helper Spec - A resolved user-owned remote-helper invocation.
- Remote
Prune Plan - Remote
Resolution Context - Explicit repository/process context for resolving a CLI remote without consulting global cwd or repository-discovery state.
- Remove
Remote Outcome - Rename
Remote Outcome - Resolved
Remote - A remote name/URL after config lookup and
insteadOfrewriting. - Silent
Progress - A
ProgressSinkthat discards every event. - SshFetch
Pack Request - Fetch
wantsfrom an SSH upload-pack remote into the repository atgit_dir, installing the resulting pack. Objects already present locally are skipped (for non-shallow fetches);promisorselects promisor-pack installation. - SshTransport
Options - SshUpload
Pack Discovery - Upload-pack discovery for a repository whose object format is not known yet.
- Transfer
Progress - Structured transfer statistics during a fetch/clone pack receive+index. All counters are monotonic within one operation and reset per operation.
- Transport
Capabilities - Transport and remote-operation capabilities exposed by
sley-remote. - Ureq
Http Client HttpClientbacked byureqwith rustls + bundled Mozilla roots.
Enums§
- Clone
Source - How
clonereaches the remote it is cloning from. - Fetch
Source - How a fetch obtains refs and objects from the remote.
- Http
Backend Operation - The smart-HTTP operation selected for a CGI request.
- Http
Backend Service - A smart-HTTP RPC service supported by Sley’s native backend.
- LsRemote
Source - How
ls_remoteobtains the ref advertisements. - Promisor
Accept Policy - Promisor
Remote Field - Push
Action - A typed push action that preserves the caller’s exact old/new/delete intent.
- Push
Destination - How a push delivers refs and objects to the remote.
- Push
RefStatus - Per-ref outcome of a push, mirroring git’s
enum ref_statusso the CLI can reproducetransport_print_push_statusbyte-for-byte.Okcovers create, update, forced update, and delete (disambiguated by the old/new ids on the owningPushReportRef); the remaining variants are the rejection reasons. - Push
Thin Mode - Whether push pack generation may use thin-pack deltas against remote objects.
- Receive
Pack Push Report - Receive-pack report-status in either wire format.
- Receive
Pack Server Report - Remote
Admin Error - Remote
Head Mutation - Remote
Helper Event - Structured presentation events emitted while executing a helper operation.
- Remote
Helper Push Error - Classified failure from
push_via_remote_helper. - Remote
Helper RefValue - One entry from a helper’s
listresponse. - Remote
Mirror - Remote
TagMode - Remote
Transport Kind - Coarse transport classification for capability lookups.
- SetUrl
Error - Why a
set_urlcall could not be applied. - SetUrl
Kind - Which URL list a
set_urlcall edits. - SetUrl
Op - The mutation
set_urlperforms on the selected URL list. - Transport
Policy Error
Constants§
- INFINITE_
DEPTH - Upstream
INFINITE_DEPTH:--unshallow, and the implicit deepen a shallow server runs for a plain fetch so its graft points reach the client.
Traits§
- Credential
Provider - Supplies credentials for an authenticated remote, mirroring git’s credential
protocol:
fillis handed a partialGitCredentialdescribing the request (protocol/host/path) and returns a completed credential, orNoneto proceed unauthenticated. - Http
Client - Minimal byte-transport over HTTP(S) used to drive smart-HTTP git transport.
- Progress
Sink - Receives human-facing progress and summary events from an operation (the
To <remote>push summary, prune notices, “Cloning into…”, etc.). The orchestration returns structured outcomes regardless; this is purely for presentation, so the default implementations discard everything. - Remote
Helper Event Sink - Presentation seam for helper warnings and per-ref rejection diagnostics.
- Remote
Helper Plumbing - Injected native plumbing used by import/export remote helpers.
Functions§
- add_
remote - Add a complete remote section and return post-config work as typed plans.
- append_
reachable_ auto_ follow_ tags - Append tags reachable from the fetched (non-tag) commits, using the remote object database to test reachability.
- apply_
configured_ fetch_ prune_ option - Apply the configured
remote.<name>.prune(thenfetch.prune) unless the prune option was set explicitly on the command line. - apply_
configured_ partial_ clone_ filter - Apply
remote.<name>.partialclonefilterwhenremote.<name>.promisoris set. - apply_
configured_ remote_ tag_ option - Apply the configured
remote.<name>.tagoptunless the tag option was set explicitly on the command line. - apply_
promisor_ remote_ field_ updates - Persist planned accepted-field updates with git’s lockfile config writer.
- apply_
receive_ pack_ report_ to_ push_ refs - Fold a receive-pack report onto the per-ref
PushStatusReport::refsentries. - apply_
remote_ head - apply_
shallow_ info - Fold the server’s shallow-info
entriesinto$GIT_DIR/shallow: the new boundary is the existing set plus everyshallow <oid>minus everyunshallow <oid>. A no-op whenentriesis empty (so a deepen request that reported no boundary change leaves the file untouched). Mirrors git’s update of the shallow file after a deepen fetch. - attach_
receive_ pack_ capabilities - Encode
featuresinto the leading ref advertisement’s capability list, inserting a syntheticcapabilities^{}entry when there are no refs. - attach_
upload_ pack_ capabilities - Encode
featuresinto the leading ref advertisement’s capability list, inserting a syntheticcapabilities^{}entry when there are no refs. - build_
push_ packfile - Build the packfile bytes for a push, excluding objects reachable from remote tips the local repository also holds.
- build_
receive_ pack_ body - Build a complete receive-pack push request body: planned commands, negotiated
capabilities, optional push-options, and the packfile from
build_push_packfile. - bundle_
uri_ fetch_ order - The order in which the advertised bundle URIs should be downloaded.
- check_
transport_ allowed - clone
- Clone the resolved
sourceinto a fresh repository atdestination. - clone_
with_ http_ client - Like
clone, but drives the smart-HTTP transport through a caller-providedHttpClientwhenhttp_clientisSome. - compute_
local_ deepen - Compute the deepen plan for a shallow local fetch, mirroring upstream
shallow.c::get_shallow_commits: a breadth-first minimum-depth walk from the (tag-dereferenced)heads— the primary planned tips, upload-pack’swant_obj, NOT auto-followed tags — where tips enter at depth 0 and a commit processed at depthdis a boundary commit whend + 1 >= depth(it is packed, but its parents are not walked). - compute_
local_ deepen_ by_ rev_ list - Deepen plan for the rev-list modes (
--shallow-since,--shallow-exclude), mirroring upstreamget_shallow_commits_by_rev_list: the kept set is every commit reachable fromheadsthat is newer thansince(when given) and not reachable from adeepen_nottip; the boundary is every kept commit with at least one parent outside the kept set. - config_
has_ promisor_ remote - Whether repository config declares at least one promisor object source.
- configured_
promisor_ remote_ names - Configured promisor remotes in Git’s lazy-fetch order.
- credential_
fill - Fill
requestusing credential helpers and, when needed,GIT_ASKPASS/core.askPass(matching upstream git’s HTTP auth retry path). - credential_
request_ for_ url - The lookup key a credential helper is asked to fill for this remote.
- credential_
store - Tell configured helpers to store (
approve = true) or erase a credential. - decide_
promisor_ remote_ reply - Apply
promisor.acceptFromServerto an advertised capability. - discover_
git_ upload_ pack_ advertisements - Discover upload-pack capabilities and object format before creating a clone.
- discover_
local_ git_ dir - discover_
remote_ helper_ fetch - discover_
ssh_ upload_ pack_ advertisements_ with_ command - Discover upload-pack capabilities and object format before creating a clone.
- execute_
push_ action_ plan - Execute a previously negotiated exact push plan.
- execute_
push_ plan - Execute a previously planned push.
- fetch
- Fetch from a resolved
sourceinto the repository atgit_dir. - fetch_
bundle - Fetch from a parsed
bundleinto the repository atgit_dir. - fetch_
head_ source_ description - The
FETCH_HEADsource description forsource: its configured URL (rewritten perurl.<base>.insteadOf) if any, otherwise the rewrittensource. - fetch_
refspec_ excludes - Whether any negative refspec excludes
name. - fetch_
refspecs_ for_ source - The effective refspec list for a fetch: explicit
refspecs, else theconfiguredremote refspecs, elseHEAD; withrefs/tags/*appended when fetching all tags. - fetch_
source_ for_ url - Build a
FetchSourcefrom a resolved URL. - fetch_
url - Resolve the fetch URL for
remoteusingconfig(name lookup +insteadOf). - fetch_
via_ discovered_ remote_ helper - Continue a previously discovered helper session after clone has finalized the provisional repository’s object format. No second helper process is started, so helper-private marks and protocol state remain intact.
- fetch_
via_ remote_ helper - Execute a user-owned remote helper’s import flow and finalize it through the
ordinary fetch engine. Repository semantics remain identical to native
transports: refspec planning, FETCH_HEAD, pruning, and ref transactions all
pass through
crate::finalize_remote_helper_fetch. - fetch_
with_ http_ client - Like
fetch, but drives the smart-HTTP transport through a caller-providedHttpClientwhenhttp_clientisSome. - finalize_
remote_ helper_ fetch - flush_
receive_ pack_ sideband - Flush a sideband-64k receive-pack response stream (after progress + report packets).
- git_
upload_ pack_ advertisements - git_
upload_ pack_ advertisements_ with_ protocol - handshake_
advertises_ bundle_ uri - http_
advertised_ refs - Parse a smart-HTTP info/refs body into a ref advertisement set for protocol
v0/v1. Protocol v2 discovery responses require a follow-up
ls-refsRPC; usehttp_service_advertisementsinstead. - http_
authorization_ headers - Build the
Authorizationheader list for an optional credential header value. - http_
backend_ service_ enabled - Apply Git’s default
http.uploadpack/http.receivepackpolicy. - http_
check_ status - Map an HTTP response status to success or a descriptive error for
url. - http_
credential_ host - The
host[:port]field of a credential request derived fromremote. - http_
discover_ upload_ pack - Discover upload-pack capabilities and object format before creating a clone.
- http_
protocol_ name - The
protocolfield of a credential request derived fromremote. - http_
protocol_ v2_ fetch_ response - Post a protocol v2
fetchRPC withwants/haves/shallow/deepenand read back the sectioned response. Authenticates and validates status. When the server advertisessideband-all, the request and response use the sideband-all wire form. - http_
remote_ bundle_ uri_ list - http_
send_ with_ auth - Perform an HTTP request, retrying once with credential-provider-supplied
authentication if the first attempt returns 401.
performis invoked with an optionalAuthorizationheader value and must be idempotent (it may run twice). A successful retry approves the credential withcredentials; a still-401 retry rejects it. - http_
service_ advertisements - Fetch and parse the ref advertisements for
servicefrom the smart-HTTP info/refs endpoint, authenticating and validating status + content type. - http_
upload_ pack_ advertisements - The upload-pack ref advertisements and parsed features for
remote. - http_
upload_ pack_ features - Bridge protocol v2 handshake capabilities (filter/shallow/…) and v0/v1 ref
advertisement capabilities into
UploadPackFeatures. - http_
url_ credential - Credential implied by
user[:password]@userinfo in the remote URL. - http_
validate_ content_ type - Verify the response
Content-Typematchesexpected(ignoring parameters). - hydrate_
objects_ from_ local_ promisor_ remotes - Hydrate the requested object IDs from configured local/file promisor remotes, returning the subset that was installed.
- hydrate_
reachable_ from_ local_ promisor_ remotes - Hydrate every missing object in
starts’ reachable closure from configured local promisor remotes. - imported_
remote_ helper_ advertisements - Convert a helper listing into ordinary advertisements after its import
stream has been installed. Unknown object IDs are resolved from the private
namespaces declared by
refspeccapabilities. - install_
fetch_ pack_ via_ git_ upload_ pack - install_
fetch_ pack_ via_ http_ protocol_ v2_ fetch - install_
fetch_ pack_ via_ http_ upload_ pack - install_
fetch_ pack_ via_ local_ upload_ pack - Fetch
wantsfrom a local repository atremote_git_dirinto the repository atgit_dir, round-tripping the request and response through the protocol codecs into the in-process upload-pack so the local path exercises the same wire format as the networked transports. Objects already present locally are skipped;promisorselects promisor-pack installation. - install_
fetch_ pack_ via_ ssh_ upload_ pack - install_
protocol_ v2_ fetch_ promisor_ response_ from_ reader - install_
protocol_ v2_ fetch_ response_ from_ reader - install_
upload_ pack_ packfile_ promisor_ response_ from_ reader - install_
upload_ pack_ packfile_ response_ from_ reader - Install an upload-pack packfile response that may use side-band-64k.
- install_
upload_ pack_ raw_ promisor_ response_ from_ reader - install_
upload_ pack_ raw_ response_ from_ reader - install_
upload_ pack_ shallow_ packfile_ promisor_ response_ from_ reader - install_
upload_ pack_ shallow_ packfile_ response_ from_ reader - Shallow deepen over smart HTTP: shallow-info section then a sideband pack.
- install_
upload_ pack_ shallow_ raw_ promisor_ response_ from_ reader - install_
upload_ pack_ shallow_ raw_ response_ from_ reader - is_
transport_ allowed - local_
fetch_ advertisements - The ref advertisements a local repository would send to a fetching client:
HEAD(if resolvable) followed by every ref, each resolved to its object id. - local_
have_ oids - The object ids the local repository can offer as
haves during negotiation. Ref tips are offered first, then every object visible through the local object database, including alternates recorded inobjects/info/alternates. - local_
push_ source_ refs - The push-source refs a local repository can match refspecs against: every ref
resolved to its object id, plus the short
refs/heads/andrefs/tags/aliases, plusHEAD. Errors if any ref’s object id does not matchformat. - ls_
remote - List the advertised refs for a resolved
source. - ls_
remote_ with - List advertisements using typed request/outcome values.
- mark_
tag_ refspec_ updates_ not_ for_ merge - Mark tag refspec updates (
refs/tags/X:refs/tags/X) as not-for-merge. - new_
http_ client - normalize_
push_ refname - Expand a short push ref name to
refs/heads/<name>, leaving empty names,HEAD, and already-qualifiedrefs/* names untouched. - normalize_
push_ refspec - Normalize a push refspec, expanding short names to
refs/heads/<name>on both sides and supplying the source as the destination when none is given, while preserving a leading+force marker. - object_
format_ for_ git_ dir - The object format of the repository whose common
$GIT_DIRiscommon_git_dir. - order_
bundle_ fetch_ all_ tags_ updates - Reorder updates so a bundle
--tagsfetch lists non-tags, then tags pointing at fetched commits, then the remaining tags (matching git’s ordering). - pack_
filter_ from_ spec - Parse a
--filterspec (blob:none,tree:N,blob:limit=…,combine:…). - pack_
filter_ from_ spec_ for_ clone - Like
pack_filter_from_spec, but also resolvessparse:oid=…against a local repository (used during clone when the source is on disk). - parse_
bundle_ uri_ line - Parse one
key=valueline from a protocol-v2bundle-uriresponse intolist, mirroring upstreambundle_uri_parse_line/bundle_list_update. - parse_
proc_ receive_ refs - Load every
receive.procReceiveRefsvalue fromconfig. - plan_
fetch_ repository - Plan the repository-dependent fetch defaults from an injected config/ref snapshot. This performs no repository discovery or filesystem access.
- plan_
http_ backend_ request - Plan one CGI request using Git’s smart-HTTP path conventions.
- plan_
push - Negotiate with the remote and compute the receive-pack command list without sending a pack or applying a ref update.
- plan_
push_ actions - Negotiate with the remote and bind a caller-authored exact push plan to a transport execution token.
- plan_
remote_ prune - prefetch_
advertised_ bundle_ uris - Download every advertised bundle (newest-first) and unbundle them into
git_dir, then createrefs/bundles/*refs from the applied bundles so the subsequent clone negotiation can use them ashaves. Mirrors upstreamfetch_bundle_urifor the auto-discovered list: - prefetch_
advertised_ bundle_ uris_ with_ client - Native, injectable variant of
prefetch_advertised_bundle_uris. - proc_
receive_ ref_ matches - promisor_
accept_ policy - promisor_
remote_ auto_ filter - Construct the concrete partial-clone filter for
--filter=autofrom the filters carried by accepted promisor advertisements. - promisor_
remote_ server_ capability - Build the server’s capability from configured promisor remotes.
- prune_
refs_ from_ advertisements - push
- Push
refspecsto a resolveddestinationfrom the repository atgit_dir. - push_
actions - Push a caller-authored exact plan, preserving its old/new/delete command ids.
- push_
destination_ for_ url - Build a
PushDestinationfrom a resolved URL. - push_
local_ uses_ receive_ pack_ server - Whether a local push should use the full receive-pack server (proc-receive).
- push_
local_ with_ report - Push to a local repository, returning git’s per-ref status report instead of
failing on the first rejection. Performs the client-side checks git’s
send-pack does — non-fast-forward and
--force-with-lease(stale info) — then (unless--dry-run) sends the surviving commands and folds the receive-pack report-status back into each ref. With--atomic, a single client-side rejection turns every other ref intoPushRefStatus::AtomicPushFailedand nothing is sent. The caller renders the report and derives the exit code. - push_
local_ with_ report_ and_ objects push_local_with_reportwith an explicit source object database.- push_
url - Resolve the push URL for
remoteusingconfig(pushurl+pushInsteadOf). - push_
url_ for_ display - Redact embedded credentials from a push URL before showing it in user-visible diagnostics.
- push_
via_ remote_ helper - Execute a user-owned remote helper’s export flow, including wildcard expansion, marks rollback on helper failure, and tracking/private-ref updates for successful destinations.
- read_
receive_ pack_ push_ report - Read a receive-pack report from
reader, demuxing sideband when negotiated. - read_
shallow - The boundary commit ids recorded in
$GIT_DIR/shallow, or an empty vec when the file is absent (a complete repository). Lines are parsed as full hex oids offormat; blank lines are ignored. - receive_
pack_ features - The receive-pack capabilities advertised for a local repository: report status, ref deletion, ofs-delta, push-options, quiet, no-thin, and the object format.
- receive_
pack_ into_ local_ repository - Apply a receive-pack push to the repository at
remote_git_dir: install the incoming packfile and execute the ref creations/updates/deletions, returning the report-status describing what happened. - receive_
pack_ request_ uses_ push_ options - Whether the client negotiated
push-options(so the caller must read the push-option section that follows the command list). - receive_
pack_ server_ report_ v1 - receive_
pack_ stream_ into_ local_ repository - Apply a receive-pack push while streaming the optional incoming packfile from
pack_readerinto the object database. This mirrorsreceive_pack_into_local_repositorybut avoids materializing the pack as aVec<u8>in stdio/SSH server paths. - reject_
non_ fast_ forward_ pushes - Reject any non-forced branch update whose old tip is not an ancestor of the new tip (a non-fast-forward). Forced updates, non-branch refs, and creations/deletions are skipped.
- remote_
advertisement_ tips_ known_ to_ local - The advertised tips the local repository already has, deduplicated and excluding the all-zero sentinel — the safe negotiation base for the push pack.
- remote_
branch_ fetch_ refspec - remote_
url_ is_ http - Whether an already-resolved remote
urluses HTTP(S) transport. - remove_
remote - rename_
remote - request_
uses_ sideband - resolve_
configured_ local_ remote_ git_ dir - resolve_
fetch_ source - Resolve fetch URL rewriting and transport source in one step.
- resolve_
local_ remote_ git_ dir - Resolve a remote name/path to a concrete local git directory.
- resolve_
push_ destination - Resolve push URL rewriting and transport destination in one step.
- resolve_
remote - Resolve a remote name or literal URL using only explicit context.
- resolve_
remote_ helper - Resolve a custom remote helper from a remote name/URL and effective config.
- retain_
missing_ auto_ follow_ tags - Drop auto-followed tags that already exist locally, keeping only missing ones.
- rewrite_
remote_ helper_ import_ stream - Rewrite branch/reset destinations in a helper-provided fast-import stream
through its declared import refspecs. This is byte-aware: counted
data Npayloads are copied verbatim, so blob or message contents that resemble fast-import commands are never interpreted as protocol lines. - run_
local_ push_ post_ hooks - run_
pre_ receive - run_
receive_ pack_ post_ hooks - run_
update_ hooks - serve_
receive_ pack - serve_
upload_ pack_ v2 - serve_
upload_ pack_ v2_ stateless_ with_ config - Serve a protocol-v2 stateless RPC request without re-advertising
capabilities. Smart HTTP performs capability discovery in its preceding
info/refsGET, so each upload-pack POST begins directly with the command response, matchinggit upload-pack --stateless-rpc. - serve_
upload_ pack_ v2_ with_ config - set_
remote_ branches - set_url
- Apply a URL edit to
remote.<name>’s fetch or push URL list, mirroringgit remote set-url(including its--push,--add, and--deletevariants). - shallow_
info_ from_ protocol_ v2_ fetch_ header - ssh_
program - The
sshprogram to spawn for SSH transport:GIT_SSH_COMMAND’s first shell word, thenGIT_SSH, thenssh. - ssh_
transport_ options_ from_ config - ssh_
upload_ pack_ advertisements - The upload-pack ref advertisements and parsed features for SSH
remote. - ssh_
upload_ pack_ advertisements_ with_ command - Read SSH upload-pack advertisements using an optional caller-selected service program while retaining the normal SSH command-shape options.
- ssh_
upload_ pack_ advertisements_ with_ options - stage_
local_ push_ quarantine - transfer_
bundle_ uri_ enabled - transport_
kind_ for_ url - Classify a rewritten URL for capability checks.
- transport_
scheme_ for_ remote - transport_
scheme_ for_ url - Classify the policy protocol name for a raw transport URL.
- upload_
pack_ features - The upload-pack capabilities advertised for the repository at
git_dir: the object format, side-band-64k, and aHEADsymref hint if present. - upload_
pack_ from_ local_ repository - Serve an upload-pack request from the repository at
git_dir: build the packfile that carries every reachable object the clientwantsbut does not alreadyhaves, framed as a raw (non-side-band) response. - upload_
pack_ request_ uses_ sideband - Whether the client negotiated a side-band channel for the packfile response.
- upload_
pack_ sideband_ response - Re-frame a raw packfile response as side-band data packets, chunked to the pkt-line payload limit (less the one-byte channel prefix).
- validate_
receive_ pack_ report - Validate a receive-pack report-status, surfacing a failed unpack or any rejected ref as an error (matching git’s exit-failure message form).
- validate_
receive_ pack_ unpack - Validate only the receive-pack unpack line (per-ref
ngis folded into status). - write_
default_ fetch_ head - Write a single default
FETCH_HEADrecord (a bareHEADfetch). - write_
fetch_ head - Write
FETCH_HEADfrom fetched ref updates, describing each bydescription. - write_
fetch_ head_ records - Write
FETCH_HEADrecords, truncating or appending perappend. - write_
receive_ pack_ server_ report - write_
receive_ pack_ sideband_ stderr - Write hook stderr captured during receive-pack as sideband-64k progress packets.
- write_
shallow - Write
$GIT_DIR/shallowfromoids, sorting and de-duplicating them the way git does (by hex, one per line, trailing newline). An empty set removes the file so the repository reads as complete.