revision.c: reduce implicit dependency the_repository
[gitweb.git] / strbuf.c
index 54f29bbb2360e7992387dc7a690a188d93878e99..64041c3c249b158478ecc6db7257519bc3fc5c19 100644 (file)
--- a/strbuf.c
+++ b/strbuf.c
@@ -921,7 +921,7 @@ void strbuf_add_unique_abbrev(struct strbuf *sb, const struct object_id *oid,
                              int abbrev_len)
 {
        int r;
-       strbuf_grow(sb, GIT_SHA1_HEXSZ + 1);
+       strbuf_grow(sb, GIT_MAX_HEXSZ + 1);
        r = find_unique_abbrev_r(sb->buf + sb->len, oid, abbrev_len);
        strbuf_setlen(sb, sb->len + r);
 }