diff options
Diffstat (limited to 'pack-write.c')
| -rw-r--r-- | pack-write.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/pack-write.c b/pack-write.c index 9004d1d095..cfcb7297b8 100644 --- a/pack-write.c +++ b/pack-write.c @@ -406,9 +406,9 @@ void fixup_pack_header_footer(int pack_fd, pack_name); if (lseek(pack_fd, 0, SEEK_SET) != 0) die_errno("Failed seeking to start of '%s'", pack_name); - the_hash_algo->update_fn(&old_hash_ctx, &hdr, sizeof(hdr)); + git_hash_update(&old_hash_ctx, &hdr, sizeof(hdr)); hdr.hdr_entries = htonl(object_count); - the_hash_algo->update_fn(&new_hash_ctx, &hdr, sizeof(hdr)); + git_hash_update(&new_hash_ctx, &hdr, sizeof(hdr)); write_or_die(pack_fd, &hdr, sizeof(hdr)); partial_pack_offset -= sizeof(hdr); @@ -423,7 +423,7 @@ void fixup_pack_header_footer(int pack_fd, break; if (n < 0) die_errno("Failed to checksum '%s'", pack_name); - the_hash_algo->update_fn(&new_hash_ctx, buf, n); + git_hash_update(&new_hash_ctx, buf, n); aligned_sz -= n; if (!aligned_sz) @@ -432,11 +432,11 @@ void fixup_pack_header_footer(int pack_fd, if (!partial_pack_hash) continue; - the_hash_algo->update_fn(&old_hash_ctx, buf, n); + git_hash_update(&old_hash_ctx, buf, n); partial_pack_offset -= n; if (partial_pack_offset == 0) { unsigned char hash[GIT_MAX_RAWSZ]; - the_hash_algo->final_fn(hash, &old_hash_ctx); + git_hash_final(hash, &old_hash_ctx); if (!hasheq(hash, partial_pack_hash, the_repository->hash_algo)) die("Unexpected checksum for %s " @@ -454,8 +454,8 @@ void fixup_pack_header_footer(int pack_fd, free(buf); if (partial_pack_hash) - the_hash_algo->final_fn(partial_pack_hash, &old_hash_ctx); - the_hash_algo->final_fn(new_pack_hash, &new_hash_ctx); + git_hash_final(partial_pack_hash, &old_hash_ctx); + git_hash_final(new_pack_hash, &new_hash_ctx); write_or_die(pack_fd, new_pack_hash, the_hash_algo->rawsz); fsync_component_or_die(FSYNC_COMPONENT_PACK, pack_fd, pack_name); } |
