@@ -185,21 +185,21 @@ struct object *lookup_unknown_object(const unsigned char *sha1)
185
185
return obj ;
186
186
}
187
187
188
- struct object * parse_object_buffer_the_repository ( const struct object_id * oid , enum object_type type , unsigned long size , void * buffer , int * eaten_p )
188
+ struct object * parse_object_buffer ( struct repository * r , const struct object_id * oid , enum object_type type , unsigned long size , void * buffer , int * eaten_p )
189
189
{
190
190
struct object * obj ;
191
191
* eaten_p = 0 ;
192
192
193
193
obj = NULL ;
194
194
if (type == OBJ_BLOB ) {
195
- struct blob * blob = lookup_blob (the_repository , oid );
195
+ struct blob * blob = lookup_blob (r , oid );
196
196
if (blob ) {
197
197
if (parse_blob_buffer (blob , buffer , size ))
198
198
return NULL ;
199
199
obj = & blob -> object ;
200
200
}
201
201
} else if (type == OBJ_TREE ) {
202
- struct tree * tree = lookup_tree (the_repository , oid );
202
+ struct tree * tree = lookup_tree (r , oid );
203
203
if (tree ) {
204
204
obj = & tree -> object ;
205
205
if (!tree -> buffer )
@@ -211,20 +211,20 @@ struct object *parse_object_buffer_the_repository(const struct object_id *oid, e
211
211
}
212
212
}
213
213
} else if (type == OBJ_COMMIT ) {
214
- struct commit * commit = lookup_commit (the_repository , oid );
214
+ struct commit * commit = lookup_commit (r , oid );
215
215
if (commit ) {
216
- if (parse_commit_buffer (the_repository , commit , buffer , size , 1 ))
216
+ if (parse_commit_buffer (r , commit , buffer , size , 1 ))
217
217
return NULL ;
218
- if (!get_cached_commit_buffer (the_repository , commit , NULL )) {
219
- set_commit_buffer (the_repository , commit , buffer , size );
218
+ if (!get_cached_commit_buffer (r , commit , NULL )) {
219
+ set_commit_buffer (r , commit , buffer , size );
220
220
* eaten_p = 1 ;
221
221
}
222
222
obj = & commit -> object ;
223
223
}
224
224
} else if (type == OBJ_TAG ) {
225
- struct tag * tag = lookup_tag (the_repository , oid );
225
+ struct tag * tag = lookup_tag (r , oid );
226
226
if (tag ) {
227
- if (parse_tag_buffer (the_repository , tag , buffer , size ))
227
+ if (parse_tag_buffer (r , tag , buffer , size ))
228
228
return NULL ;
229
229
obj = & tag -> object ;
230
230
}
0 commit comments