Skip to main content

Crate sley_remote

Crate sley_remote 

Source
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, or NoCredentials for 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§

AddRemoteOptions
AddRemoteOutcome
BundleUriEntry
BundleUriList
CloneOptions
The clone inputs the library needs for the branch-tracking flow, all resolved by the caller. The remaining git clone knobs (bare/mirror, --revision, templates, config overrides, sparse, separate-git-dir, etc.) stay in the CLI: the unsupported ones are gated before clone is called, and the config-writing ones run inside the configure/configure_branch callbacks.
CloneOutcome
The structured result of a clone.
CloneRequest
Fully resolved inputs for a clone run.
CloneServices
Mutable seams used while cloning.
CredentialHelperProvider
The default CredentialProvider: fills and stores credentials via credential.helper programs.
DiscoveredRemoteHelperFetchOperation
Fetch inputs used after a live helper has already negotiated capabilities, refs, and object format during clone bootstrap.
FetchBundleRequest
Fully resolved inputs for a fetch_bundle run.
FetchOptions
Controls for a fetch run, mirroring the git fetch flags the CLI parses.
FetchOutcome
The structured result of a fetch.
FetchRepositoryPlan
Repository-derived defaults for one fetch invocation.
FetchRequest
Fully resolved inputs for a fetch run.
FetchServices
Mutable seams used while fetching.
GitFetchPackRequest
HttpBackendPlan
A validated native smart-HTTP operation.
HttpBackendRequest
Environment-derived input to plan_http_backend_request.
HttpFetchPackRequest
Fetch wants from an HTTP upload-pack remote into the repository at git_dir, installing the resulting pack. Objects already present locally are skipped (for non-shallow fetches); promisor selects promisor-pack installation.
HttpOperationBatch
Reusable HTTP client for every smart-HTTP RPC in one remote operation.
HttpResponse
A buffered HTTP response whose body streams directly from the network.
HttpServiceAdvertisements
Result of smart-HTTP service discovery: parsed ref advertisements plus the protocol v2 handshake when the server negotiated v2 on the info/refs exchange.
HttpUploadPackDiscovery
Upload-pack discovery for a repository whose object format is not known yet.
LocalDeepenPlan
The in-process upload-pack’s plan for a deepen (shallow) local fetch: which shallow/unshallow updates to report, which commits the pack walk must stop at, and which extra tips become packable because the client’s boundary moved.
LsRemoteFilter
The ref-class filters that select which advertised refs to keep, mirroring the git ls-remote flags the CLI parses.
LsRemoteOutcome
Structured advertisement result for embedders.
LsRemoteRecord
One advertised ref returned by ls_remote — what the CLI prints as a <oid>\t<name> line (with an optional preceding ref: <symref>\t<name> line when --symref is set and symref is present).
LsRemoteRequest
Fully resolved inputs for an advertisement listing.
NoCredentials
A CredentialProvider that never supplies credentials, so every request is attempted unauthenticated. This is what an embedder targeting public remotes (e.g. heddle) uses to suppress prompts.
PackGenerationProgress
Equal-work counts for one pack generated natively by Sley.
ProcReceiveRefPattern
One configured receive.procReceiveRefs pattern.
ProcReceiveReport
Per-command proc-receive state carried through receive-pack execution.
PromisorRemoteDecision
PromisorRemoteFieldUpdate
PruneRefsInput
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 through progress (unless quiet). Returns the refs that were pruned.
PrunedRef
A remote-tracking ref removed by a prune pass.
PushActionPlan
A caller-authored push plan. This is distinct from PushPlan, which is a negotiated, executable transport token returned by plan_push.
PushActionRequest
Fully resolved inputs for a caller-authored exact push plan.
PushCommand
One caller-authored receive-pack command.
PushOptions
Controls for a push run, mirroring the git push flags the CLI parses that affect the wire/planning behavior the library owns.
PushOutcome
The structured result of a push.
PushPackRequest
Inputs for building a push packfile or full receive-pack request body.
PushPlan
A push after ref negotiation and command planning, but before any ref update is sent or applied.
PushQuarantine
Disposable object directory used to expose incoming local-push objects to receive-side hooks without making them part of the destination repository.
PushReportRef
One ref’s line in git’s push status report. Carries everything print_one_push_report needs: 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 classified PushRefStatus.
PushReportRequest
Fully resolved inputs for a status-reporting push to a local repository.
PushRequest
Fully resolved inputs for a push run.
PushServices
Mutable seams used while pushing.
PushStatusReport
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 the pull-before-push advice.
ReceivePackCommandState
ReceivePackServerOptions
ReceivePackServerOutcome
ReceivePackServerRequest
RemoteHeadPlan
RemoteHelperCapabilities
Capabilities advertised by a remote helper.
RemoteHelperExportRequest
A runtime request for the fast-export half of a remote-helper push.
RemoteHelperFetchDiscovery
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.
RemoteHelperFetchOperation
Fully resolved inputs for a remote-helper fetch.
RemoteHelperFetchRequest
Final ref bookkeeping for objects installed by a remote helper’s import stream. The helper owns object transfer; this engine operation deliberately shares Git-compatible refspec planning, FETCH_HEAD, pruning, and reference transactions with fetch.
RemoteHelperFetchServices
Runtime seams used by a remote-helper fetch.
RemoteHelperPushOperation
Fully resolved inputs for a remote-helper push.
RemoteHelperPushOptions
Controls for the protocol-affecting portion of a remote-helper push.
RemoteHelperPushOutcome
Structured result of a successful remote-helper push.
RemoteHelperPushServices
Runtime seams used by a remote-helper push.
RemoteHelperRef
RemoteHelperSession
A live remote-helper process. The caller may inspect capabilities/listing, then consume the session into either an import or export operation.
RemoteHelperSpec
A resolved user-owned remote-helper invocation.
RemotePrunePlan
RemoteResolutionContext
Explicit repository/process context for resolving a CLI remote without consulting global cwd or repository-discovery state.
RemoveRemoteOutcome
RenameRemoteOutcome
ResolvedRemote
A remote name/URL after config lookup and insteadOf rewriting.
SilentProgress
A ProgressSink that discards every event.
SshFetchPackRequest
Fetch wants from an SSH upload-pack remote into the repository at git_dir, installing the resulting pack. Objects already present locally are skipped (for non-shallow fetches); promisor selects promisor-pack installation.
SshTransportOptions
SshUploadPackDiscovery
Upload-pack discovery for a repository whose object format is not known yet.
TransferProgress
Structured transfer statistics during a fetch/clone pack receive+index. All counters are monotonic within one operation and reset per operation.
TransportCapabilities
Transport and remote-operation capabilities exposed by sley-remote.
UreqHttpClient
HttpClient backed by ureq with rustls + bundled Mozilla roots.

Enums§

CloneSource
How clone reaches the remote it is cloning from.
FetchSource
How a fetch obtains refs and objects from the remote.
HttpBackendOperation
The smart-HTTP operation selected for a CGI request.
HttpBackendService
A smart-HTTP RPC service supported by Sley’s native backend.
LsRemoteSource
How ls_remote obtains the ref advertisements.
PromisorAcceptPolicy
PromisorRemoteField
PushAction
A typed push action that preserves the caller’s exact old/new/delete intent.
PushDestination
How a push delivers refs and objects to the remote.
PushRefStatus
Per-ref outcome of a push, mirroring git’s enum ref_status so the CLI can reproduce transport_print_push_status byte-for-byte. Ok covers create, update, forced update, and delete (disambiguated by the old/new ids on the owning PushReportRef); the remaining variants are the rejection reasons.
PushThinMode
Whether push pack generation may use thin-pack deltas against remote objects.
ReceivePackPushReport
Receive-pack report-status in either wire format.
ReceivePackServerReport
RemoteAdminError
RemoteHeadMutation
RemoteHelperEvent
Structured presentation events emitted while executing a helper operation.
RemoteHelperPushError
Classified failure from push_via_remote_helper.
RemoteHelperRefValue
One entry from a helper’s list response.
RemoteMirror
RemoteTagMode
RemoteTransportKind
Coarse transport classification for capability lookups.
SetUrlError
Why a set_url call could not be applied.
SetUrlKind
Which URL list a set_url call edits.
SetUrlOp
The mutation set_url performs on the selected URL list.
TransportPolicyError

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§

CredentialProvider
Supplies credentials for an authenticated remote, mirroring git’s credential protocol: fill is handed a partial GitCredential describing the request (protocol/host/path) and returns a completed credential, or None to proceed unauthenticated.
HttpClient
Minimal byte-transport over HTTP(S) used to drive smart-HTTP git transport.
ProgressSink
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.
RemoteHelperEventSink
Presentation seam for helper warnings and per-ref rejection diagnostics.
RemoteHelperPlumbing
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 (then fetch.prune) unless the prune option was set explicitly on the command line.
apply_configured_partial_clone_filter
Apply remote.<name>.partialclonefilter when remote.<name>.promisor is set.
apply_configured_remote_tag_option
Apply the configured remote.<name>.tagopt unless 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::refs entries.
apply_remote_head
apply_shallow_info
Fold the server’s shallow-info entries into $GIT_DIR/shallow: the new boundary is the existing set plus every shallow <oid> minus every unshallow <oid>. A no-op when entries is 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 features into the leading ref advertisement’s capability list, inserting a synthetic capabilities^{} entry when there are no refs.
attach_upload_pack_capabilities
Encode features into the leading ref advertisement’s capability list, inserting a synthetic capabilities^{} 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 source into a fresh repository at destination.
clone_with_http_client
Like clone, but drives the smart-HTTP transport through a caller-provided HttpClient when http_client is Some.
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’s want_obj, NOT auto-followed tags — where tips enter at depth 0 and a commit processed at depth d is a boundary commit when d + 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 upstream get_shallow_commits_by_rev_list: the kept set is every commit reachable from heads that is newer than since (when given) and not reachable from a deepen_not tip; 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 request using 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.acceptFromServer to 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 source into the repository at git_dir.
fetch_bundle
Fetch from a parsed bundle into the repository at git_dir.
fetch_head_source_description
The FETCH_HEAD source description for source: its configured URL (rewritten per url.<base>.insteadOf) if any, otherwise the rewritten source.
fetch_refspec_excludes
Whether any negative refspec excludes name.
fetch_refspecs_for_source
The effective refspec list for a fetch: explicit refspecs, else the configured remote refspecs, else HEAD; with refs/tags/* appended when fetching all tags.
fetch_source_for_url
Build a FetchSource from a resolved URL.
fetch_url
Resolve the fetch URL for remote using config (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-provided HttpClient when http_client is Some.
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-refs RPC; use http_service_advertisements instead.
http_authorization_headers
Build the Authorization header list for an optional credential header value.
http_backend_service_enabled
Apply Git’s default http.uploadpack/http.receivepack policy.
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 from remote.
http_discover_upload_pack
Discover upload-pack capabilities and object format before creating a clone.
http_protocol_name
The protocol field of a credential request derived from remote.
http_protocol_v2_fetch_response
Post a protocol v2 fetch RPC with wants/haves/shallow/deepen and read back the sectioned response. Authenticates and validates status. When the server advertises sideband-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. perform is invoked with an optional Authorization header value and must be idempotent (it may run twice). A successful retry approves the credential with credentials; a still-401 retry rejects it.
http_service_advertisements
Fetch and parse the ref advertisements for service from 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-Type matches expected (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 refspec capabilities.
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 wants from a local repository at remote_git_dir into the repository at git_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; promisor selects 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 in objects/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/and refs/tags/ aliases, plus HEAD. Errors if any ref’s object id does not match format.
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-qualified refs/* 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_DIR is common_git_dir.
order_bundle_fetch_all_tags_updates
Reorder updates so a bundle --tags fetch lists non-tags, then tags pointing at fetched commits, then the remaining tags (matching git’s ordering).
pack_filter_from_spec
Parse a --filter spec (blob:none, tree:N, blob:limit=…, combine:…).
pack_filter_from_spec_for_clone
Like pack_filter_from_spec, but also resolves sparse:oid=… against a local repository (used during clone when the source is on disk).
parse_bundle_uri_line
Parse one key=value line from a protocol-v2 bundle-uri response into list, mirroring upstream bundle_uri_parse_line / bundle_list_update.
parse_proc_receive_refs
Load every receive.procReceiveRefs value from config.
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 create refs/bundles/* refs from the applied bundles so the subsequent clone negotiation can use them as haves. Mirrors upstream fetch_bundle_uri for 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=auto from 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 refspecs to a resolved destination from the repository at git_dir.
push_actions
Push a caller-authored exact plan, preserving its old/new/delete command ids.
push_destination_for_url
Build a PushDestination from 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 into PushRefStatus::AtomicPushFailed and nothing is sent. The caller renders the report and derives the exit code.
push_local_with_report_and_objects
push_local_with_report with an explicit source object database.
push_url
Resolve the push URL for remote using config (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 of format; 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_reader into the object database. This mirrors receive_pack_into_local_repository but avoids materializing the pack as a Vec<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 url uses 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 N payloads 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/refs GET, so each upload-pack POST begins directly with the command response, matching git 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, mirroring git remote set-url (including its --push, --add, and --delete variants).
shallow_info_from_protocol_v2_fetch_header
ssh_program
The ssh program to spawn for SSH transport: GIT_SSH_COMMAND’s first shell word, then GIT_SSH, then ssh.
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 a HEAD symref 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 client wants but does not already haves, 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 ng is folded into status).
write_default_fetch_head
Write a single default FETCH_HEAD record (a bare HEAD fetch).
write_fetch_head
Write FETCH_HEAD from fetched ref updates, describing each by description.
write_fetch_head_records
Write FETCH_HEAD records, truncating or appending per append.
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/shallow from oids, 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.