This adds a SHA512 hash of the resulting merged tree to merge commit messages. Assuming gpg uses a sufficiently strong hash internally, this results in our gpg signed commits avoiding any potential SHA1 issues w.r.t. the commit's resulting contents (but NOT its history).
The hash can be verified by running git ls-tree --full-tree -r --name-only HEAD | LANG=C sort | xargs -n 1 sha512sum | sha512sum in the repository root.