What is the format of a git tag object and how to calculate its SHA?

前端 未结 4 867
小蘑菇
小蘑菇 2020-12-11 10:45

I am familiar with how Git creates SHA1 hashes for files (blobs), but not how they are created for tag objects. I assume they are, if I create an annotated tag, but what is

4条回答
  •  不知归路
    2020-12-11 10:53

    It's pretty much the same, although the smallish header prepended to the commit object is different. You can use git cat-file to see the actual format.

提交回复
热议问题