grep: use the right index instead of the_index
[gitweb.git] / strbuf.c
index b0716ac585285a971c04952254c34a00aab9f0ef..030556111d197e02bb2b2ed0796e683fe69391d6 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);
 }