What data is being signed when you `git commit --gpg-sign=<key-id>`?
问题 I'm trying to figure out how to sign/verify commits by hand, but I can't figure out what data is being signed to create the signature. In other words, I can't figure out what <data> in gpg --verify <commit-sig> <data> needs to be. Here's the relevant bit of git's source code: https://github.com/git/git/blob/master/commit.c#L1047-L1231 but I'm also new to C. Here's some example data: In a fresh git repo, I create a file ledger.txt and commit it with a signed commit: git config --global user