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>
This commit is contained in:
brian m. carlson 2018-10-15 00:01:58 +00:00 committed by Junio C Hamano
parent fbd0e37cde
commit d8a3a69020
1 changed files with 1 additions and 1 deletions

2
tag.c
View File

@ -144,7 +144,7 @@ int parse_tag_buffer(struct repository *r, struct tag *item, const void *data, u
return 0;
item->object.parsed = 1;
if (size < GIT_SHA1_HEXSZ + 24)
if (size < the_hash_algo->hexsz + 24)
return -1;
if (memcmp("object ", bufptr, 7) || parse_oid_hex(bufptr + 7, &oid, &bufptr) || *bufptr++ != '\n')
return -1;