@@ -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 );
@@ -206,8 +206,8 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name,
206206 ret = stream_blob (& oid );
207207 goto cleanup ;
208208 }
209- buf = repo_read_object_file (the_repository , & oid , & type ,
210- & size );
209+ buf = odb_read_object (the_repository -> objects , & oid ,
210+ & type , & size );
211211 if (!buf )
212212 die ("Cannot read object %s" , obj_name );
213213
@@ -228,10 +228,8 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name,
228228 struct object_id blob_oid ;
229229 if (odb_read_object_info (the_repository -> objects ,
230230 & oid , NULL ) == OBJ_TAG ) {
231- char * buffer = repo_read_object_file (the_repository ,
232- & oid ,
233- & type ,
234- & size );
231+ char * buffer = odb_read_object (the_repository -> objects ,
232+ & oid , & type , & size );
235233 const char * target ;
236234
237235 if (!buffer )
@@ -412,10 +410,8 @@ static void print_object_or_die(struct batch_options *opt, struct expand_data *d
412410 if (!textconv_object (the_repository ,
413411 data -> rest , 0100644 , oid ,
414412 1 , & contents , & size ))
415- contents = repo_read_object_file (the_repository ,
416- oid ,
417- & type ,
418- & size );
413+ contents = odb_read_object (the_repository -> objects ,
414+ oid , & type , & size );
419415 if (!contents )
420416 die ("could not convert '%s' %s" ,
421417 oid_to_hex (oid ), data -> rest );
@@ -432,8 +428,8 @@ static void print_object_or_die(struct batch_options *opt, struct expand_data *d
432428 unsigned long size ;
433429 void * contents ;
434430
435- contents = repo_read_object_file (the_repository , oid , & type ,
436- & size );
431+ contents = odb_read_object (the_repository -> objects , oid ,
432+ & type , & size );
437433 if (!contents )
438434 die ("object %s disappeared" , oid_to_hex (oid ));
439435
@@ -542,8 +538,8 @@ static void batch_object_write(const char *obj_name,
542538 size_t s = data -> size ;
543539 char * buf = NULL ;
544540
545- buf = repo_read_object_file (the_repository , & data -> oid , & data -> type ,
546- & data -> size );
541+ buf = odb_read_object (the_repository -> objects , & data -> oid ,
542+ & data -> type , & data -> size );
547543 if (!buf )
548544 die (_ ("unable to read %s" ), oid_to_hex (& data -> oid ));
549545 buf = replace_idents_using_mailmap (buf , & s );
0 commit comments