aboutsummaryrefslogtreecommitdiffstats
path: root/object-name.c
diff options
context:
space:
mode:
Diffstat (limited to 'object-name.c')
-rw-r--r--object-name.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/object-name.c b/object-name.c
index 732056ff5e..4407f67ff8 100644
--- a/object-name.c
+++ b/object-name.c
@@ -696,15 +696,14 @@ static inline char get_hex_char_from_oid(const struct object_id *oid,
return hex[oid->hash[pos >> 1] & 0xf];
}
-static int extend_abbrev_len(const struct object_id *oid, void *cb_data)
+static int extend_abbrev_len(const struct object_id *oid,
+ struct min_abbrev_data *mad)
{
- struct min_abbrev_data *mad = cb_data;
-
unsigned int i = mad->init_len;
while (mad->hex[i] && mad->hex[i] == get_hex_char_from_oid(oid, i))
i++;
- if (i < GIT_MAX_RAWSZ && i >= mad->cur_len)
+ if (mad->hex[i] && i >= mad->cur_len)
mad->cur_len = i + 1;
return 0;