tag: express constant in terms of the_hash_algo
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
brian m. carlson committed
Oct 15, 2018 at 00:01 UTC
d8a3a690204ec8583b536e562d46632cae5cfe03
1 file changed
+1
-1
tag.c
+1
-1
@@ -144,7 +144,7 @@ int parse_tag_buffer(struct repository *r, struct tag *item, const void *data, u
144
return 0;
145
item->object.parsed = 1;
146
147
- if (size < GIT_SHA1_HEXSZ + 24)
147
+ if (size < the_hash_algo->hexsz + 24)
148
return -1;
149
if (memcmp("object ", bufptr, 7) || parse_oid_hex(bufptr + 7, &oid, &bufptr) || *bufptr++ != '\n')
150
return -1;