Skip to main content
Formatting
Source Link
Ry-
  • 222.8k
  • 55
  • 483
  • 489

I am confused as to how SHA-1 hash isSHA-1 hashes are calculated for commitcommits, trees, and blobs. As per this articlethis article, commit hashes are calculated based on following factors:

1. The source tree of the commit (which unravels to all the subtrees and blobs) 2. The parent commit sha1 3. The author info 4. The committer info (right, those are different!) 5. The commit message

  1. The source tree of the commit (which unravels to all the subtrees and blobs)
  2. The parent commit sha1
  3. The author info
  4. The committer info (right, those are different!)
  5. The commit message

IsAre the same factors involved for treestree and blobsblob hashes as well?

Thanks

I am confused as to how SHA-1 hash is calculated for commit, trees and blobs. As per this article, commit hashes are calculated based on following factors:

1. The source tree of the commit (which unravels to all the subtrees and blobs) 2. The parent commit sha1 3. The author info 4. The committer info (right, those are different!) 5. The commit message

Is the same factors involved for trees and blobs hashes as well?

Thanks

I am confused as to how SHA-1 hashes are calculated for commits, trees, and blobs. As per this article, commit hashes are calculated based on following factors:

  1. The source tree of the commit (which unravels to all the subtrees and blobs)
  2. The parent commit sha1
  3. The author info
  4. The committer info (right, those are different!)
  5. The commit message

Are the same factors involved for tree and blob hashes as well?

Source Link
appu
  • 481
  • 1
  • 8
  • 26

How hash is calculated for commit vs tree vs blobs?

I am confused as to how SHA-1 hash is calculated for commit, trees and blobs. As per this article, commit hashes are calculated based on following factors:

1. The source tree of the commit (which unravels to all the subtrees and blobs) 2. The parent commit sha1 3. The author info 4. The committer info (right, those are different!) 5. The commit message

Is the same factors involved for trees and blobs hashes as well?

Thanks