diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2017-07-13 23:49:30 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-07-17 13:54:51 -0700 |
commit | ac53fe860147636cd8671efe26bd002a6cb5cd13 (patch) | |
tree | c8b5707364c2fc4a30e01a3e7860b71d19ba7ce3 /sha1_name.c | |
parent | 321c89bf5fa937b19800fa97cfe93199b817d34f (diff) | |
download | git-ac53fe860147636cd8671efe26bd002a6cb5cd13.tar.gz |
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>
Diffstat (limited to 'sha1_name.c')
-rw-r--r-- | sha1_name.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sha1_name.c b/sha1_name.c index 7577eaecfa..862b6f1308 100644 --- a/sha1_name.c +++ b/sha1_name.c @@ -500,10 +500,10 @@ int find_unique_abbrev_r(char *hex, const unsigned char *sha1, int len) } sha1_to_hex_r(hex, sha1); - if (len == 40 || !len) - return 40; + if (len == GIT_SHA1_HEXSZ || !len) + return GIT_SHA1_HEXSZ; exists = has_sha1_file(sha1); - while (len < 40) { + while (len < GIT_SHA1_HEXSZ) { struct object_id oid_ret; status = get_short_oid(hex, len, &oid_ret, GET_OID_QUIETLY); if (exists |