Skip to main content

Module notes

Module notes 

Source
Expand description

Storage: benchmark results as git notes under refs/notes/tak.

Why notes rather than an orphan branch or a committed file:

  • The data is about a commit, which is exactly what notes are for.
  • cat_sort_uniq resolves concurrent writers with no custom merge driver.
  • The notes tree is keyed by commit SHA as path names and does not reference the annotated commits, so a single shallow fetch of this one ref returns the entire history without cloning the repository — measured at 36ms / 124K for 100 commits × 6 benchmarks, with zero project commit objects transferred. That property is what makes a hosted dashboard cheap.

All network operations shell out to git on purpose. actions/checkout sets up auth via http.extraheader, and users have credential helpers, SSH agents and corporate proxies; reimplementing any of that is a trap. Local object access can move to gix later without changing this boundary.

Structs§

Logged
One commit on a first-parent walk, with whatever tak recorded on it.

Constants§

NOTES_REF

Functions§

append
Append records to commit’s note locally, preserving anything already there.
fetch
Pull the notes ref from remote.
file_at
The contents of path, relative to the repository root, in commit’s tree, or None when that tree has no such file.
install_refspec
Teach plain git fetch about the notes ref, so the data is visible to users who never run tak. A convenience, not load-bearing — every tak read path fetches for itself.
is_shallow_boundary
Whether sha is where this clone’s history was cut off, so a walk that ended there ran out of clone rather than out of project.
log
Every commit on rev’s first-parent history, newest first, with its records.
log_until
log, stopping as soon as done says the commit just read is the last one needed. That commit is kept.
prefix
The current directory relative to the repository root, as git spells it: a/b/ in a subdirectory, empty at the root.
push
Push the notes ref, resolving races against other CI jobs.
read
Read every record attached to commit, after refreshing from the remote.
rev_list
The most recent n commits reachable from rev, newest first.
rev_parse
Resolve a revision to the full SHA of the commit it names.
trailers
The values of trailer key on every commit in base..head, one line per commit: its SHA, then each value, every field NUL-separated.