Commit Diff


commit - 88f63b904d6768aa839ff6b4bc1b5dbef7025cdd
commit + 3b914f16826132066f13f2529950b8b6895b49b7
blob - 641d2b5b84fd5163c607e96980ad52cb3109c1ae
blob + 87a99174a618b6c0c8c20933dc6313adbd0d4576
--- lib/hash.c
+++ lib/hash.c
@@ -205,7 +205,10 @@ void
 got_hash_final_object_id(struct got_hash *hash, struct got_object_id *id)
 {
 	memset(id, 0, sizeof(*id));
-	got_hash_final(hash, id->sha1);
+	if (hash->algo == GOT_HASH_SHA1)
+		SHA1Final(id->sha1, &hash->sha1_ctx);
+	else
+		abort();
 }
 
 int