@@ -364,7 +364,7 @@ const void *detach_commit_buffer(struct commit *commit, unsigned long *sizep)
364
364
return ret ;
365
365
}
366
366
367
- int parse_commit_buffer_the_repository ( struct commit * item , const void * buffer , unsigned long size , int check_graph )
367
+ int parse_commit_buffer ( struct repository * r , struct commit * item , const void * buffer , unsigned long size , int check_graph )
368
368
{
369
369
const char * tail = buffer ;
370
370
const char * bufptr = buffer ;
@@ -384,11 +384,11 @@ int parse_commit_buffer_the_repository(struct commit *item, const void *buffer,
384
384
if (get_oid_hex (bufptr + 5 , & parent ) < 0 )
385
385
return error ("bad tree pointer in commit %s" ,
386
386
oid_to_hex (& item -> object .oid ));
387
- item -> maybe_tree = lookup_tree (the_repository , & parent );
387
+ item -> maybe_tree = lookup_tree (r , & parent );
388
388
bufptr += tree_entry_len + 1 ; /* "tree " + "hex sha1" + "\n" */
389
389
pptr = & item -> parents ;
390
390
391
- graft = lookup_commit_graft (the_repository , & item -> object .oid );
391
+ graft = lookup_commit_graft (r , & item -> object .oid );
392
392
while (bufptr + parent_entry_len < tail && !memcmp (bufptr , "parent " , 7 )) {
393
393
struct commit * new_parent ;
394
394
@@ -403,15 +403,15 @@ int parse_commit_buffer_the_repository(struct commit *item, const void *buffer,
403
403
*/
404
404
if (graft && (graft -> nr_parent < 0 || grafts_replace_parents ))
405
405
continue ;
406
- new_parent = lookup_commit (the_repository , & parent );
406
+ new_parent = lookup_commit (r , & parent );
407
407
if (new_parent )
408
408
pptr = & commit_list_insert (new_parent , pptr )-> next ;
409
409
}
410
410
if (graft ) {
411
411
int i ;
412
412
struct commit * new_parent ;
413
413
for (i = 0 ; i < graft -> nr_parent ; i ++ ) {
414
- new_parent = lookup_commit (the_repository ,
414
+ new_parent = lookup_commit (r ,
415
415
& graft -> parent [i ]);
416
416
if (!new_parent )
417
417
continue ;
0 commit comments