@@ -1392,7 +1392,7 @@ static void conclude_pack(int fix_thin_pack, const char *curr_pack, unsigned cha
13921392 strbuf_release (& msg );
13931393 finalize_hashfile (f , tail_hash , FSYNC_COMPONENT_PACK , 0 );
13941394 hashcpy (read_hash , pack_hash , the_repository -> hash_algo );
1395- fixup_pack_header_footer (output_fd , pack_hash ,
1395+ fixup_pack_header_footer (the_hash_algo , output_fd , pack_hash ,
13961396 curr_pack , nr_objects ,
13971397 read_hash , consumed_bytes - the_hash_algo -> rawsz );
13981398 if (!hasheq (read_hash , tail_hash , the_repository -> hash_algo ))
@@ -2089,11 +2089,12 @@ int cmd_index_pack(int argc,
20892089 ALLOC_ARRAY (idx_objects , nr_objects );
20902090 for (i = 0 ; i < nr_objects ; i ++ )
20912091 idx_objects [i ] = & objects [i ].idx ;
2092- curr_index = write_idx_file (index_name , idx_objects , nr_objects , & opts , pack_hash );
2092+ curr_index = write_idx_file (the_hash_algo , index_name , idx_objects ,
2093+ nr_objects , & opts , pack_hash );
20932094 if (rev_index )
2094- curr_rev_index = write_rev_file (rev_index_name , idx_objects ,
2095- nr_objects , pack_hash ,
2096- opts .flags );
2095+ curr_rev_index = write_rev_file (the_hash_algo , rev_index_name ,
2096+ idx_objects , nr_objects ,
2097+ pack_hash , opts .flags );
20972098 free (idx_objects );
20982099
20992100 if (!verify )
0 commit comments