{"thread":{"id":"5930","subject":"[PATCH 2/2] Replace open-coded version of hash_sha1_file()","startedAt":"2006-10-15T12:02:18Z","lastAt":"2006-10-15T12:02:18Z","messageCount":1,"participants":["Rene Scharfe"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"28797","messageId":"4532234A.3090700@lsrfire.ath.cx","threadId":"5930","inReplyTo":null,"subject":"[PATCH 2/2] Replace open-coded version of hash_sha1_file()","fromName":"Rene Scharfe","fromEmail":"rene.scharfe@lsrfire.ath.cx","sentAt":"2006-10-15T12:02:18Z","receivedAt":"2006-10-15T12:02:18Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>\n---\n sha1_file.c |    8 +-------\n 1 files changed, 1 insertions(+), 7 deletions(-)\n\ndiff --git a/sha1_file.c b/sha1_file.c\nindex 66cc767..716aef3 100644\n--- a/sha1_file.c\n+++ b/sha1_file.c\n@@ -671,14 +671,8 @@ static void reprepare_packed_git(void)\n \n int check_sha1_signature(const unsigned char *sha1, void *map, unsigned long size, const char *type)\n {\n-\tchar header[100];\n \tunsigned char real_sha1[20];\n-\tSHA_CTX c;\n-\n-\tSHA1_Init(&c);\n-\tSHA1_Update(&c, header, 1+sprintf(header, \"%s %lu\", type, size));\n-\tSHA1_Update(&c, map, size);\n-\tSHA1_Final(real_sha1, &c);\n+\thash_sha1_file(map, size, type, real_sha1);\n \treturn hashcmp(sha1, real_sha1) ? -1 : 0;\n }\n \n-- \n1.4.3.rc2.gdce3\n"}]}