summaryrefslogtreecommitdiff
path: root/builtin/unpack-objects.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/unpack-objects.c')
-rw-r--r--builtin/unpack-objects.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c
index f6b9825fb0..8383bcf404 100644
--- a/builtin/unpack-objects.c
+++ b/builtin/unpack-objects.c
@@ -28,7 +28,7 @@ static unsigned char buffer[4096];
static unsigned int offset, len;
static off_t consumed_bytes;
static off_t max_input_size;
-static git_hash_ctx ctx;
+static struct git_hash_ctx ctx;
static struct fsck_options fsck_options = FSCK_OPTIONS_STRICT;
static struct progress *progress;
@@ -70,7 +70,7 @@ static void *fill(int min)
if (min > sizeof(buffer))
die("cannot fill %d bytes", min);
if (offset) {
- the_hash_algo->update_fn(&ctx, buffer, offset);
+ git_hash_update(&ctx, buffer, offset);
memmove(buffer, buffer + offset, len);
offset = 0;
}
@@ -614,7 +614,7 @@ int cmd_unpack_objects(int argc,
{
int i;
struct object_id oid;
- git_hash_ctx tmp_ctx;
+ struct git_hash_ctx tmp_ctx;
disable_replace_refs();
@@ -667,10 +667,9 @@ int cmd_unpack_objects(int argc,
}
the_hash_algo->init_fn(&ctx);
unpack_all();
- the_hash_algo->update_fn(&ctx, buffer, offset);
- the_hash_algo->init_fn(&tmp_ctx);
- the_hash_algo->clone_fn(&tmp_ctx, &ctx);
- the_hash_algo->final_oid_fn(&oid, &tmp_ctx);
+ git_hash_update(&ctx, buffer, offset);
+ git_hash_clone(&tmp_ctx, &ctx);
+ git_hash_final_oid(&oid, &tmp_ctx);
if (strict) {
write_rest();
if (fsck_finish(&fsck_options))