summary refs log tree commit diff
path: root/cache.h
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-02-05 00:48:32 +0100
committerJunio C Hamano <gitster@pobox.com>2022-02-25 17:16:32 -0800
commit44439c1c5827480f68b37c3cc38f257eaeb3ed2c (patch)
tree405962dbb5c68dbc18a2082a066c75a21a669b1d /cache.h
parent0ff7b4f976b78ab38313356b3e0582e5fa9a3bcc (diff)
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>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/cache.h b/cache.h
index c068f99c79..2027803c49 100644
--- a/cache.h
+++ b/cache.h
@@ -1327,7 +1327,8 @@ int parse_loose_header(const char *hdr, struct object_info *oi);
  * what we expected, but it might also indicate another error.
  */
 int check_object_signature(struct repository *r, const struct object_id *oid,
-			   void *buf, unsigned long size, const char *type);
+			   void *map, unsigned long size,
+			   enum object_type type);
 
 /**
  * A streaming version of check_object_signature().