object-file API: have hash_object_file() take "enum object_type"
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 <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
0ff7b4f976
commit
44439c1c58
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user