Expand description
Throwaway checkouts of historical commits, for tak backfill --commits.
Each commit is built and measured in a detached git worktree under an
owner-only temporary directory, never in the user’s own checkout: a build
that rewrites target/ or a fixture there would leave the working tree in
the state of whatever commit was measured last. Worktrees share the
repository’s object store and refs, so a checkout costs only the files it
writes, and a note recorded from the main checkout lands on the same
refs/notes/tak.
Git is a subprocess here for the same reason it is in crate::notes.
Structs§
- Failed
Commits - Commits that failed in an earlier run, with how and under what.
- Worktree
- A detached checkout of one commit, removed when dropped.
Enums§
- Failure
- How a remembered commit failed.
Functions§
- build_
finished - The build has been reaped; its group id may be reused from here on.
- build_
started - The build has been spawned as the leader of process group
pid. - clean_
up_ on_ interrupt - Remove this process’s worktrees and
scratchwhen tak is interrupted. - commit_
time - When
shawas committed, as seconds since the epoch, read from the raw commit object. - fingerprint
- A 64-bit FNV-1a hash, as lowercase hex: a stable fingerprint of
tak.toml for
FailedCommits’s measurement key. Not std’sHasher, whose output is allowed to change between Rust releases, which would forget every remembered failure on a toolchain upgrade. - prune
- Forget worktrees whose directories no longer exist.
- stopping
- Whether an interrupt is being handled. A build that fails from here on was killed by tak, not broken by its commit.
- toplevel
- The root of the work tree containing
dir. - wait_
if_ interrupted - Never return once an interrupt has arrived: wait for the cleanup thread to exit the process.