summaryrefslogtreecommitdiff
path: root/src/libgit2/revparse.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/revparse.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/revparse.c')
-rw-r--r--src/libgit2/revparse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libgit2/revparse.c b/src/libgit2/revparse.c
index 9bc28e9fc..3226e28fa 100644
--- a/src/libgit2/revparse.c
+++ b/src/libgit2/revparse.c
@@ -29,7 +29,7 @@ static int maybe_sha(git_object **out, git_repository *repo, const char *spec)
{
size_t speclen = strlen(spec);
- if (speclen != GIT_OID_HEXSZ)
+ if (speclen != GIT_OID_SHA1_HEXSIZE)
return GIT_ENOTFOUND;
return maybe_sha_or_abbrev(out, repo, spec, speclen);
@@ -110,7 +110,7 @@ static int revparse_lookup_object(
if (error != GIT_ENOTFOUND)
return error;
- if ((strlen(spec) < GIT_OID_HEXSZ) &&
+ if ((strlen(spec) < GIT_OID_SHA1_HEXSIZE) &&
((error = maybe_abbrev(object_out, repo, spec)) != GIT_ENOTFOUND))
return error;