Parse Git commit trailers when processing commits
This adds support for parsing Git trailers (https://git-scm.com/docs/git-interpret-trailers). GitLab will use these trailers to generate changelog information, as part of the epic gitlab-com/gl-infra&351 (closed).
Parsing is done by parsing the output of git log
when finding multiple
commits, and by parsing the output of git show
when finding a single commit.
The Go parser is written such that it allocates as few objects as possible,
making it possible to efficiently parse trailers; even when listing thousands of
commits.
See gitlab-com/gl-infra/delivery#1364 (closed) for more information.
Edited by Yorick Peterse