sha1_name: convert uses of 40 to GIT_SHA1_HEXSZ

There are several uses of the constant 40 in find_unique_abbrev_r. Convert them to GIT_SHA1_HEXSZ. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

brian m. carlson committed Jul 13, 2017 at 23:49 UTC ac53fe860147636cd8671efe26bd002a6cb5cd13
1 file changed +3 -3
sha1_name.c
+3 -3
@@ -500,10 +500,10 @@ int find_unique_abbrev_r(char *hex, const unsigned char *sha1, int len)
500 }
501
502 sha1_to_hex_r(hex, sha1);
503 - if (len == 40 || !len)
504 - return 40;
503 + if (len == GIT_SHA1_HEXSZ || !len)
504 + return GIT_SHA1_HEXSZ;
505 exists = has_sha1_file(sha1);
506 - while (len < 40) {
506 + while (len < GIT_SHA1_HEXSZ) {
507 struct object_id oid_ret;
508 status = get_short_oid(hex, len, &oid_ret, GET_OID_QUIETLY);
509 if (exists