geschichte.git.push provides an opt-in JVM API for hosts that need finite
export work and an explicit publication decision. Existing Git export APIs are
unchanged. This API does not grant permissions, manage credentials, retry a
request, or persist a host's operation journal.
The host supplies a complete operation from recommended-policy, a selected
refs/heads/... ref, and its exact expected remote SHA-1 OID. Use the explicit
all-zero OID for a branch that must not exist. prepare-http! checks the
advertised ref before reading the source, then projects one immutable source
snapshot. It returns a bounded pack, logical commit/OID mappings, the source
checkpoint, and the exact old/new OIDs.
prepare-http!. Review and bind the result to the captured source;
never accept prepared pack bytes or mappings from an untrusted wire request.mapping-tx. Its exact
checkpoint guard refuses any intervening source change. Require a positive
transaction acknowledgement before proceeding. These mappings establish Git
identity, not remote presence, and may remain after a refused push.send-http! once. The original expected old OID is also sent in Git's
receive-pack compare-and-swap. A concurrent remote update is refused by the
receiver; there is no force-push fallback.Only ancestry of the verified expected remote commit is receiver-known. Such commits are boundaries and need not be regenerated. Other commits require full snapshots and canonical reconstruction; any stored Git OID must exactly match the reconstruction. Imported frontier stubs outside receiver-known ancestry refuse. This deliberately does not promise arbitrary imported-history export to a different empty remote.
Native parent relations are unordered, so projected parent OIDs are sorted. Limits cover graph visits and edges, stage entries, paths, depth, content reads, object sizes, accumulated output, compressed pack bytes and HTTP response bytes. The pack writer charges before growing its output buffer and uses bounded compression chunks. All work shares one operation and deadline. Choose smaller host limits when appropriate; finite defaults are not a service quota.
Remote publication currently requires SHA-1 and report-status, updates exactly
one branch, and accepts only an unambiguous status for that branch. Branch
deletion, force push, automatic retries and credential storage are outside this
API.
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |