@@ -155,10 +155,10 @@ static int already_written(struct bulk_checkin_packfile *state, struct object_id
155
155
* status before calling us just in case we ask it to call us again
156
156
* with a new pack.
157
157
*/
158
- static int stream_to_pack (struct bulk_checkin_packfile * state ,
159
- git_hash_ctx * ctx , off_t * already_hashed_to ,
160
- int fd , size_t size , enum object_type type ,
161
- const char * path , unsigned flags )
158
+ static int stream_blob_to_pack (struct bulk_checkin_packfile * state ,
159
+ git_hash_ctx * ctx , off_t * already_hashed_to ,
160
+ int fd , size_t size , const char * path ,
161
+ unsigned flags )
162
162
{
163
163
git_zstream s ;
164
164
unsigned char ibuf [16384 ];
@@ -170,7 +170,7 @@ static int stream_to_pack(struct bulk_checkin_packfile *state,
170
170
171
171
git_deflate_init (& s , pack_compression_level );
172
172
173
- hdrlen = encode_in_pack_object_header (obuf , sizeof (obuf ), type , size );
173
+ hdrlen = encode_in_pack_object_header (obuf , sizeof (obuf ), OBJ_BLOB , size );
174
174
s .next_out = obuf + hdrlen ;
175
175
s .avail_out = sizeof (obuf ) - hdrlen ;
176
176
@@ -247,11 +247,10 @@ static void prepare_to_stream(struct bulk_checkin_packfile *state,
247
247
die_errno ("unable to write pack header" );
248
248
}
249
249
250
- static int deflate_to_pack (struct bulk_checkin_packfile * state ,
251
- struct object_id * result_oid ,
252
- int fd , size_t size ,
253
- enum object_type type , const char * path ,
254
- unsigned flags )
250
+ static int deflate_blob_to_pack (struct bulk_checkin_packfile * state ,
251
+ struct object_id * result_oid ,
252
+ int fd , size_t size ,
253
+ const char * path , unsigned flags )
255
254
{
256
255
off_t seekback , already_hashed_to ;
257
256
git_hash_ctx ctx ;
@@ -265,7 +264,7 @@ static int deflate_to_pack(struct bulk_checkin_packfile *state,
265
264
return error ("cannot find the current offset" );
266
265
267
266
header_len = format_object_header ((char * )obuf , sizeof (obuf ),
268
- type , size );
267
+ OBJ_BLOB , size );
269
268
the_hash_algo -> init_fn (& ctx );
270
269
the_hash_algo -> update_fn (& ctx , obuf , header_len );
271
270
the_hash_algo -> init_fn (& checkpoint .ctx );
@@ -283,8 +282,8 @@ static int deflate_to_pack(struct bulk_checkin_packfile *state,
283
282
idx -> offset = state -> offset ;
284
283
crc32_begin (state -> f );
285
284
}
286
- if (!stream_to_pack (state , & ctx , & already_hashed_to ,
287
- fd , size , type , path , flags ))
285
+ if (!stream_blob_to_pack (state , & ctx , & already_hashed_to ,
286
+ fd , size , path , flags ))
288
287
break ;
289
288
/*
290
289
* Writing this object to the current pack will make
@@ -351,12 +350,12 @@ void fsync_loose_object_bulk_checkin(int fd, const char *filename)
351
350
}
352
351
}
353
352
354
- int index_bulk_checkin (struct object_id * oid ,
355
- int fd , size_t size , enum object_type type ,
356
- const char * path , unsigned flags )
353
+ int index_blob_bulk_checkin (struct object_id * oid ,
354
+ int fd , size_t size ,
355
+ const char * path , unsigned flags )
357
356
{
358
- int status = deflate_to_pack (& bulk_checkin_packfile , oid , fd , size , type ,
359
- path , flags );
357
+ int status = deflate_blob_to_pack (& bulk_checkin_packfile , oid , fd , size ,
358
+ path , flags );
360
359
if (!odb_transaction_nesting )
361
360
flush_bulk_checkin_packfile (& bulk_checkin_packfile );
362
361
return status ;
0 commit comments