@@ -24,7 +24,7 @@ static struct bulk_checkin_state {
2424
2525static void finish_bulk_checkin (struct bulk_checkin_state * state )
2626{
27- unsigned char sha1 [ 20 ] ;
27+ struct object_id oid ;
2828 struct strbuf packname = STRBUF_INIT ;
2929 int i ;
3030
@@ -36,19 +36,19 @@ static void finish_bulk_checkin(struct bulk_checkin_state *state)
3636 unlink (state -> pack_tmp_name );
3737 goto clear_exit ;
3838 } else if (state -> nr_written == 1 ) {
39- sha1close (state -> f , sha1 , CSUM_FSYNC );
39+ sha1close (state -> f , oid . hash , CSUM_FSYNC );
4040 } else {
41- int fd = sha1close (state -> f , sha1 , 0 );
42- fixup_pack_header_footer (fd , sha1 , state -> pack_tmp_name ,
43- state -> nr_written , sha1 ,
41+ int fd = sha1close (state -> f , oid . hash , 0 );
42+ fixup_pack_header_footer (fd , oid . hash , state -> pack_tmp_name ,
43+ state -> nr_written , oid . hash ,
4444 state -> offset );
4545 close (fd );
4646 }
4747
4848 strbuf_addf (& packname , "%s/pack/pack-" , get_object_directory ());
4949 finish_tmp_packfile (& packname , state -> pack_tmp_name ,
5050 state -> written , state -> nr_written ,
51- & state -> pack_idx_opts , sha1 );
51+ & state -> pack_idx_opts , oid . hash );
5252 for (i = 0 ; i < state -> nr_written ; i ++ )
5353 free (state -> written [i ]);
5454
0 commit comments