@@ -6415,7 +6415,7 @@ void flush_one_hunk(struct object_id *result, struct git_hash_ctx *ctx)
64156415 unsigned short carry = 0 ;
64166416 int i ;
64176417
6418- the_hash_algo -> final_fn (hash , ctx );
6418+ git_hash_final (hash , ctx );
64196419 the_hash_algo -> init_fn (ctx );
64206420 /* 20-byte sum, with carry */
64216421 for (i = 0 ; i < the_hash_algo -> rawsz ; ++ i ) {
@@ -6434,22 +6434,22 @@ static int patch_id_consume(void *priv, char *line, unsigned long len)
64346434 return 0 ;
64356435 new_len = remove_space (line , len );
64366436
6437- the_hash_algo -> update_fn (data -> ctx , line , new_len );
6437+ git_hash_update (data -> ctx , line , new_len );
64386438 data -> patchlen += new_len ;
64396439 return 0 ;
64406440}
64416441
64426442static void patch_id_add_string (struct git_hash_ctx * ctx , const char * str )
64436443{
6444- the_hash_algo -> update_fn (ctx , str , strlen (str ));
6444+ git_hash_update (ctx , str , strlen (str ));
64456445}
64466446
64476447static void patch_id_add_mode (struct git_hash_ctx * ctx , unsigned mode )
64486448{
64496449 /* large enough for 2^32 in octal */
64506450 char buf [12 ];
64516451 int len = xsnprintf (buf , sizeof (buf ), "%06o" , mode );
6452- the_hash_algo -> update_fn (ctx , buf , len );
6452+ git_hash_update (ctx , buf , len );
64536453}
64546454
64556455/* returns 0 upon success, and writes result into oid */
@@ -6493,9 +6493,9 @@ static int diff_get_patch_id(struct diff_options *options, struct object_id *oid
64936493 len2 = remove_space (p -> two -> path , strlen (p -> two -> path ));
64946494 patch_id_add_string (& ctx , "diff--git" );
64956495 patch_id_add_string (& ctx , "a/" );
6496- the_hash_algo -> update_fn (& ctx , p -> one -> path , len1 );
6496+ git_hash_update (& ctx , p -> one -> path , len1 );
64976497 patch_id_add_string (& ctx , "b/" );
6498- the_hash_algo -> update_fn (& ctx , p -> two -> path , len2 );
6498+ git_hash_update (& ctx , p -> two -> path , len2 );
64996499
65006500 if (p -> one -> mode == 0 ) {
65016501 patch_id_add_string (& ctx , "newfilemode" );
@@ -6514,24 +6514,24 @@ static int diff_get_patch_id(struct diff_options *options, struct object_id *oid
65146514 /* don't do anything since we're only populating header info */
65156515 } else if (diff_filespec_is_binary (options -> repo , p -> one ) ||
65166516 diff_filespec_is_binary (options -> repo , p -> two )) {
6517- the_hash_algo -> update_fn (& ctx , oid_to_hex (& p -> one -> oid ),
6517+ git_hash_update (& ctx , oid_to_hex (& p -> one -> oid ),
65186518 the_hash_algo -> hexsz );
6519- the_hash_algo -> update_fn (& ctx , oid_to_hex (& p -> two -> oid ),
6519+ git_hash_update (& ctx , oid_to_hex (& p -> two -> oid ),
65206520 the_hash_algo -> hexsz );
65216521 } else {
65226522 if (p -> one -> mode == 0 ) {
65236523 patch_id_add_string (& ctx , "---/dev/null" );
65246524 patch_id_add_string (& ctx , "+++b/" );
6525- the_hash_algo -> update_fn (& ctx , p -> two -> path , len2 );
6525+ git_hash_update (& ctx , p -> two -> path , len2 );
65266526 } else if (p -> two -> mode == 0 ) {
65276527 patch_id_add_string (& ctx , "---a/" );
6528- the_hash_algo -> update_fn (& ctx , p -> one -> path , len1 );
6528+ git_hash_update (& ctx , p -> one -> path , len1 );
65296529 patch_id_add_string (& ctx , "+++/dev/null" );
65306530 } else {
65316531 patch_id_add_string (& ctx , "---a/" );
6532- the_hash_algo -> update_fn (& ctx , p -> one -> path , len1 );
6532+ git_hash_update (& ctx , p -> one -> path , len1 );
65336533 patch_id_add_string (& ctx , "+++b/" );
6534- the_hash_algo -> update_fn (& ctx , p -> two -> path , len2 );
6534+ git_hash_update (& ctx , p -> two -> path , len2 );
65356535 }
65366536
65376537 if (fill_mmfile (options -> repo , & mf1 , p -> one ) < 0 ||
0 commit comments