On Thu, May 14 2026, Tomas Volf wrote:
> I have encountered bug with the hook we install for adding Change-Id
> trailer.  It for some reason inserts it as a first line of the commit
> message instead of at the end.

The trailer is installed by git-interpret-trailers, which says in its
man page:

--8<---------------cut here---------------start------------->8---
This command can also operate on the output of git-format-patch(1),
which is more elaborate than a plain commit message. Namely, such output
includes a commit message (as above), a "---" divider line, and a patch
part. For these inputs, the divider and patch parts are not modified by
this command and are emitted as is on the output, unless --no-divider is
specified.
--8<---------------cut here---------------end--------------->8---

It looks like we could just add the --no-divider option whenever we call
interpret-trailers. However, in the comments of the hook it mentions
avoiding using --in-place because it's only for git 2.8 and up. The
--no-divider option seems to have appeared in 2.19.2 based on the online
documentation[1], so presumably we would also like to avoid it.

I'm not sure why we're limiting ourselves to git versions and features
from 2017.

Carlo

[1]: https://git-scm.com/docs/git-interpret-trailers/2.19.2



Reply via email to