@@ -74,7 +74,7 @@ static int filter_object(const char *path, unsigned mode,
7474{
7575 enum object_type type ;
7676
77- * buf = repo_read_object_file (the_repository , oid , & type , size );
77+ * buf = odb_read_object (the_repository -> objects , oid , & type , size );
7878 if (!* buf )
7979 return error (_ ("cannot read object %s '%s'" ),
8080 oid_to_hex (oid ), path );
@@ -197,8 +197,8 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name)
197197 ret = stream_blob (& oid );
198198 goto cleanup ;
199199 }
200- buf = repo_read_object_file (the_repository , & oid , & type ,
201- & size );
200+ buf = odb_read_object (the_repository -> objects , & oid ,
201+ & type , & size );
202202 if (!buf )
203203 die ("Cannot read object %s" , obj_name );
204204
@@ -219,10 +219,8 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name)
219219 struct object_id blob_oid ;
220220 if (odb_read_object_info (the_repository -> objects ,
221221 & oid , NULL ) == OBJ_TAG ) {
222- char * buffer = repo_read_object_file (the_repository ,
223- & oid ,
224- & type ,
225- & size );
222+ char * buffer = odb_read_object (the_repository -> objects ,
223+ & oid , & type , & size );
226224 const char * target ;
227225
228226 if (!buffer )
@@ -403,10 +401,8 @@ static void print_object_or_die(struct batch_options *opt, struct expand_data *d
403401 if (!textconv_object (the_repository ,
404402 data -> rest , 0100644 , oid ,
405403 1 , & contents , & size ))
406- contents = repo_read_object_file (the_repository ,
407- oid ,
408- & type ,
409- & size );
404+ contents = odb_read_object (the_repository -> objects ,
405+ oid , & type , & size );
410406 if (!contents )
411407 die ("could not convert '%s' %s" ,
412408 oid_to_hex (oid ), data -> rest );
@@ -423,8 +419,8 @@ static void print_object_or_die(struct batch_options *opt, struct expand_data *d
423419 unsigned long size ;
424420 void * contents ;
425421
426- contents = repo_read_object_file (the_repository , oid , & type ,
427- & size );
422+ contents = odb_read_object (the_repository -> objects , oid ,
423+ & type , & size );
428424 if (!contents )
429425 die ("object %s disappeared" , oid_to_hex (oid ));
430426
@@ -533,8 +529,8 @@ static void batch_object_write(const char *obj_name,
533529 size_t s = data -> size ;
534530 char * buf = NULL ;
535531
536- buf = repo_read_object_file (the_repository , & data -> oid , & data -> type ,
537- & data -> size );
532+ buf = odb_read_object (the_repository -> objects , & data -> oid ,
533+ & data -> type , & data -> size );
538534 if (!buf )
539535 die (_ ("unable to read %s" ), oid_to_hex (& data -> oid ));
540536 buf = replace_idents_using_mailmap (buf , & s );
0 commit comments