sha-1 check in rev-list --verify-objects redundant?
From: Nguyen Thai Ngoc Duy <hidden>
Date: 2016-06-15 22:53:09
From: Nguyen Thai Ngoc Duy <hidden>
Date: 2016-06-15 22:53:09
Hi, "git rev-list --verify-objects" calls parse_object() on all except commits. This function in turn does check_sha1_signature() which rehashes object content to verify the content matches its sha-1 signature. This is an expensive operation. I wonder if this is a redundant check. --verify-objects is called to verify new packs. index-pack is also (always?) called on new packs, and index-pack hashes all object content, saves the hashes as signature in pack index file. So they must match. Am I missing something here? -- Duy