Although it is not documented anywhere, a review of the source code shows that this is all the contents of the commit object. Then the contents will be changed to insert the signature, so the verification process should deprive the signature in a separate buffer and transfer the initial data of the preliminary signature to the GPG signing.
The GPG signature data is then executed when calculating the SHA-1 checksum for commit to become a commit hash identifier. See gpg-interface.c and commit.c , sign_buffer and do_sign_commit respectively. The tag signature is located in builtin/tag.c (see do_sign Function and its calling object); signed tags have their own signatures, not inserted, but otherwise it works in much the same way.
torek source share