@@ -93,7 +93,7 @@ static int already_written(struct bulk_checkin_state *state, unsigned char sha1[
93
93
* with a new pack.
94
94
*/
95
95
static int stream_to_pack (struct bulk_checkin_state * state ,
96
- git_SHA_CTX * ctx , off_t * already_hashed_to ,
96
+ git_hash_ctx * ctx , off_t * already_hashed_to ,
97
97
int fd , size_t size , enum object_type type ,
98
98
const char * path , unsigned flags )
99
99
{
@@ -127,7 +127,7 @@ static int stream_to_pack(struct bulk_checkin_state *state,
127
127
if (rsize < hsize )
128
128
hsize = rsize ;
129
129
if (hsize )
130
- git_SHA1_Update (ctx , ibuf , hsize );
130
+ the_hash_algo -> update_fn (ctx , ibuf , hsize );
131
131
* already_hashed_to = offset ;
132
132
}
133
133
s .next_in = ibuf ;
@@ -192,7 +192,7 @@ static int deflate_to_pack(struct bulk_checkin_state *state,
192
192
unsigned flags )
193
193
{
194
194
off_t seekback , already_hashed_to ;
195
- git_SHA_CTX ctx ;
195
+ git_hash_ctx ctx ;
196
196
unsigned char obuf [16384 ];
197
197
unsigned header_len ;
198
198
struct hashfile_checkpoint checkpoint ;
@@ -204,8 +204,8 @@ static int deflate_to_pack(struct bulk_checkin_state *state,
204
204
205
205
header_len = xsnprintf ((char * )obuf , sizeof (obuf ), "%s %" PRIuMAX ,
206
206
typename (type ), (uintmax_t )size ) + 1 ;
207
- git_SHA1_Init (& ctx );
208
- git_SHA1_Update (& ctx , obuf , header_len );
207
+ the_hash_algo -> init_fn (& ctx );
208
+ the_hash_algo -> update_fn (& ctx , obuf , header_len );
209
209
210
210
/* Note: idx is non-NULL when we are writing */
211
211
if ((flags & HASH_WRITE_OBJECT ) != 0 )
@@ -236,7 +236,7 @@ static int deflate_to_pack(struct bulk_checkin_state *state,
236
236
if (lseek (fd , seekback , SEEK_SET ) == (off_t ) - 1 )
237
237
return error ("cannot seek back" );
238
238
}
239
- git_SHA1_Final (result_sha1 , & ctx );
239
+ the_hash_algo -> final_fn (result_sha1 , & ctx );
240
240
if (!idx )
241
241
return 0 ;
242
242
0 commit comments