Expand description
The notes refs as origin’s mirror (SPEC.md, “Which refs are read”).
Structs§
- Publish
- How a publish is carried out. Every producer and every signed-notes ref (attestations, their inputs, provenance) goes through the same loop.
Enums§
- Mirror
- What became of one notes ref. SPEC.md, “Lookup”.
- Published
- What a publish came to.
- Push
Failure - Why a push that exited non-zero failed, read from git’s stderr.
Functions§
- classify_
push - The markers behind
PushFailure. Raced wins over Unreachable: a message naming both is a race that happened on a reachable remote. A hook’s own output rides the same stream, so Unreachable is read only from the lines git and ssh themselves print. - publish
- Attach each
(object, block)on the REMOTE’s copy ofnotes_ref(short name, underrefs/notes/) and push. Nevernotes add -f, which erases every other producer’s block, and never a push of the local ref, which would re-publish a block origin revoked: - publish_
local - The same, into the local
notes_refonly, with no remote involved: whatsign --no-pushwrites underrefs/notes/attest-local/. - sync_
mirrors - Bring both mirrors in line with origin: one fetch of both refs into
throwaways and, when that fails without timing out, one
ls-remoteto tell “origin has no such ref” from “origin did not answer” — then, if some refs exist, one more fetch of those. A silent origin costs one call (15 s at most), a dead one two (30 s), the worst case three (45 s).