From dbc4ac1c76827e954e0aa27afe8bb7e0b8993a93 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Sat, 22 Jan 2022 23:10:03 -0500 Subject: 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. --- src/libgit2/diff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libgit2/diff.c') diff --git a/src/libgit2/diff.c b/src/libgit2/diff.c index 9840d6050..f593f7336 100644 --- a/src/libgit2/diff.c +++ b/src/libgit2/diff.c @@ -290,7 +290,7 @@ static int flush_hunk(git_oid *result, git_hash_ctx *ctx) (error = git_hash_init(ctx)) < 0) return error; - for (i = 0; i < GIT_OID_RAWSZ; i++) { + for (i = 0; i < GIT_OID_SHA1_SIZE; i++) { carry += result->id[i] + hash.id[i]; result->id[i] = (unsigned char)carry; carry >>= 8; -- cgit v1.2.1