summaryrefslogtreecommitdiff
path: root/apply.c
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-02-04 23:48:32 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-02-26 01:16:32 (GMT)
commit44439c1c5827480f68b37c3cc38f257eaeb3ed2c (patch)
tree405962dbb5c68dbc18a2082a066c75a21a669b1d /apply.c
parent0ff7b4f976b78ab38313356b3e0582e5fa9a3bcc (diff)
downloadgit-44439c1c5827480f68b37c3cc38f257eaeb3ed2c.zip
git-44439c1c5827480f68b37c3cc38f257eaeb3ed2c.tar.gz
git-44439c1c5827480f68b37c3cc38f257eaeb3ed2c.tar.bz2
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 'apply.c')
-rw-r--r--apply.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apply.c b/apply.c
index e82a7c3..8513755 100644
--- a/apply.c
+++ b/apply.c
@@ -3157,7 +3157,7 @@ static int apply_binary(struct apply_state *state,
* See if the old one matches what the patch
* applies to.
*/
- hash_object_file(the_hash_algo, img->buf, img->len, blob_type,
+ hash_object_file(the_hash_algo, img->buf, img->len, OBJ_BLOB,
&oid);
if (strcmp(oid_to_hex(&oid), patch->old_oid_prefix))
return error(_("the patch applies to '%s' (%s), "
@@ -3203,7 +3203,7 @@ static int apply_binary(struct apply_state *state,
name);
/* verify that the result matches */
- hash_object_file(the_hash_algo, img->buf, img->len, blob_type,
+ hash_object_file(the_hash_algo, img->buf, img->len, OBJ_BLOB,
&oid);
if (strcmp(oid_to_hex(&oid), patch->new_oid_prefix))
return error(_("binary patch to '%s' creates incorrect result (expecting %s, got %s)"),