diff options
author | Rene Scharfe <rene.scharfe@lsrfire.ath.cx> | 2006-10-15 14:02:18 +0200 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-10-15 12:35:25 -0700 |
commit | 7cfb5f367e50402c0bc75d89542d7ada4c5b8da4 (patch) | |
tree | d1f02fc1f0dfabd20dcb5b5d166a3ba7caa42d24 /sha1_file.c | |
parent | 972a9155832165ea38febba2303e7c760050b5d8 (diff) | |
download | git-7cfb5f367e50402c0bc75d89542d7ada4c5b8da4.tar.gz git-7cfb5f367e50402c0bc75d89542d7ada4c5b8da4.tar.xz |
Replace open-coded version of hash_sha1_file()
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'sha1_file.c')
-rw-r--r-- | sha1_file.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/sha1_file.c b/sha1_file.c index 66cc7679c..716aef33e 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -671,14 +671,8 @@ static void reprepare_packed_git(void) int check_sha1_signature(const unsigned char *sha1, void *map, unsigned long size, const char *type) { - char header[100]; unsigned char real_sha1[20]; - SHA_CTX c; - - SHA1_Init(&c); - SHA1_Update(&c, header, 1+sprintf(header, "%s %lu", type, size)); - SHA1_Update(&c, map, size); - SHA1_Final(real_sha1, &c); + hash_sha1_file(map, size, type, real_sha1); return hashcmp(sha1, real_sha1) ? -1 : 0; } |