Expand description
The commits real Git builds for the service: an editor, a signature, and what the service does not embed.
What:
The commits real Git builds for the commit service: an editor, a signature, and every command line the service does
not build itself.
Why:
Git owns the editor, the signer and the message semantics of whatever the service cannot embed, so this module points
real git commit at a thin scratch repository (its HEAD and branch at the base, the policy-settled private index,
the real configuration included, every hook off) whose new objects go straight into the real object store. Nothing is
locked and nothing is registered: the scratch repository sits inside the commit’s own scratch directory, is removed
with it, and the commit it makes is only an object until the service moves the branch to it by compare-and-swap
(doc/planning/cli-git-resident-service.md, “Commits Git builds”).
In TS you’d write (pseudocode):
const { commit, parents } = await buildWithGit({ context, cwd, capture, scratch, commitIndex, arguments });Structs§
- Build
Input - Everything the build needs from the preparation that settled the private index.
- GitBuilt
- What the scratch repository’s
git commitmade.
Functions§
- build_
with_ git - What:
Runs real
git commitagainst the scratch repository and reads the commit it made. Why: Git’s own output, editor and signer reach the person’s terminal as they would from a plaingit commit; a nonzero status of Git is the command’s status and nothing lands. - message_
of - The message after the header block of a stored commit.
- parents_
of - The parents named by a stored commit’s header block.
- private_
invocation - What:
The kept global options and the commit options of the arguments, with the pathspecs and the selection options the
private index already holds removed.
Why:
Real
git commitmust commit the private index as it stands, so it is given neither the paths nor-a.