From 44439c1c5827480f68b37c3cc38f257eaeb3ed2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Sat, 5 Feb 2022 00:48:32 +0100 Subject: object-file API: have hash_object_file() take "enum object_type" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change the hash_object_file() function to take an "enum object_type". Since a preceding commit all of its callers are passing either "{commit,tree,blob,tag}_type", or the result of a call to type_name(), the parse_object() caller that would pass NULL is now using stream_object_signature(). Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- pack-check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pack-check.c') diff --git a/pack-check.c b/pack-check.c index d8d8f91de6..bfb593ba72 100644 --- a/pack-check.c +++ b/pack-check.c @@ -143,7 +143,7 @@ static int verify_packfile(struct repository *r, oid_to_hex(&oid), p->pack_name, (uintmax_t)entries[i].offset); else if (data && check_object_signature(r, &oid, data, size, - type_name(type)) < 0) + type) < 0) err = error("packed %s from %s is corrupt", oid_to_hex(&oid), p->pack_name); else if (!data && stream_object_signature(r, &oid) < 0) -- cgit v1.2.3