pub fn trailers(
base: &str,
head: &str,
key: &str,
first_parent: bool,
) -> Result<String>Expand description
The values of trailer key on every commit in base..head, one line per
commit: its SHA, then each value, every field NUL-separated.
Every commit in the range, not first-parent only — the opposite choice to
rev_list, for a different question. A trend follows the trunk; this asks
what the change being measured declares, and under a merge-commit workflow
the declaration sits on the branch commits, reachable only through the
merge’s second parent. Under squash-merge the range is the one squashed
commit, and whatever trailers survived into its message.
unfold joins a value git wrapped onto continuation lines, and the NUL
separator keeps repeated trailers on one line, so a line is always exactly
one commit. NUL rather than a comma because it is the one byte a trailer
value cannot hold: joining with commas made Tak-Accept: a,b and two
trailers a and b produce the same output, so a benchmark named a,b
could only ever be read as two others. Commits with no such trailer still
print their SHA; the parser skips the empty value.
--no-show-signature for the same reason log passes it: a user’s
log.showSignature would otherwise put GPG output on stdout, between the
lines this parses. --end-of-options and -- keep the range a revision
whatever it looks like.
first_parent narrows the range to the trunk’s own commits, for tak detect: after a merge, what landed on main is the commit on its
first-parent line — the squash, the rebased commit, or the merge itself —
and that is the history a main-branch check has reviewed as merged. A
branch commit behind a merge’s second parent was only ever gated on its
pull request.