@@ -24,7 +24,7 @@ static struct bulk_checkin_state {
24
24
25
25
static void finish_bulk_checkin (struct bulk_checkin_state * state )
26
26
{
27
- unsigned char sha1 [ 20 ] ;
27
+ struct object_id oid ;
28
28
struct strbuf packname = STRBUF_INIT ;
29
29
int i ;
30
30
@@ -36,19 +36,19 @@ static void finish_bulk_checkin(struct bulk_checkin_state *state)
36
36
unlink (state -> pack_tmp_name );
37
37
goto clear_exit ;
38
38
} else if (state -> nr_written == 1 ) {
39
- sha1close (state -> f , sha1 , CSUM_FSYNC );
39
+ sha1close (state -> f , oid . hash , CSUM_FSYNC );
40
40
} 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 ,
44
44
state -> offset );
45
45
close (fd );
46
46
}
47
47
48
48
strbuf_addf (& packname , "%s/pack/pack-" , get_object_directory ());
49
49
finish_tmp_packfile (& packname , state -> pack_tmp_name ,
50
50
state -> written , state -> nr_written ,
51
- & state -> pack_idx_opts , sha1 );
51
+ & state -> pack_idx_opts , oid . hash );
52
52
for (i = 0 ; i < state -> nr_written ; i ++ )
53
53
free (state -> written [i ]);
54
54
0 commit comments