by haberman · 12y ago · 0 comments
> [A signed commit] doesn't guarantee anything about the contents of that commit if the repository has been tampered with.
I think most people would intuitively expect the signed commit to guarantee the contents of the tree being signed. The idea that you could "git pull" a repo from a compromised machine, verify the signed commit, but not actually have a guarantee about the tree matching the one that was signed would run counter to most people's expectations, I suspect.
In other words, this to me seems like a "technically, we don't guarantee" statement about something that is de facto thought to be guaranteed.
I'm not sure that it says anywhere in the documentation that it guarantees anything more than that, but I agree that a significant proportion of developers would intuitively expect that the entire content of the tree to be signed rather than just the SHA1.
Further evidence that they do assume that: https://news.ycombinator.com/item?id=7003900