summaryrefslogtreecommitdiff
path: root/src/libgit2/pack-objects.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2022-01-22 23:10:03 -0500
committerEdward Thomson <ethomson@edwardthomson.com>2022-06-14 22:29:57 -0400
commitdbc4ac1c76827e954e0aa27afe8bb7e0b8993a93 (patch)
tree56f18a11bca8d17490a176cddf9e3756c2cebe91 /src/libgit2/pack-objects.c
parentf98dd5438f8d7bfd557b612fdf1605b1c3fb8eaf (diff)
downloadlibgit2-dbc4ac1c76827e954e0aa27afe8bb7e0b8993a93.tar.gz
oid: `GIT_OID_*SZ` is now `GIT_OID_SHA1_*SIZE`
In preparation for SHA256 support, `GIT_OID_RAWSZ` and `GIT_OID_HEXSZ` need to indicate that they're the size of _SHA1_ OIDs.
Diffstat (limited to 'src/libgit2/pack-objects.c')
-rw-r--r--src/libgit2/pack-objects.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libgit2/pack-objects.c b/src/libgit2/pack-objects.c
index 1aa6731b3..068231649 100644
--- a/src/libgit2/pack-objects.c
+++ b/src/libgit2/pack-objects.c
@@ -347,8 +347,8 @@ static int write_object(
goto done;
if (type == GIT_OBJECT_REF_DELTA) {
- if ((error = write_cb(po->delta->id.id, GIT_OID_RAWSZ, cb_data)) < 0 ||
- (error = git_hash_update(&pb->ctx, po->delta->id.id, GIT_OID_RAWSZ)) < 0)
+ if ((error = write_cb(po->delta->id.id, GIT_OID_SHA1_SIZE, cb_data)) < 0 ||
+ (error = git_hash_update(&pb->ctx, po->delta->id.id, GIT_OID_SHA1_SIZE)) < 0)
goto done;
}
@@ -668,7 +668,7 @@ static int write_pack(git_packbuilder *pb,
if ((error = git_hash_final(entry_oid.id, &pb->ctx)) < 0)
goto done;
- error = write_cb(entry_oid.id, GIT_OID_RAWSZ, cb_data);
+ error = write_cb(entry_oid.id, GIT_OID_SHA1_SIZE, cb_data);
done:
/* if callback cancelled writing, we must still free delta_data */