aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--object-name.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/object-name.c b/object-name.c
index 1e0118e8a6..4407f67ff8 100644
--- a/object-name.c
+++ b/object-name.c
@@ -703,7 +703,7 @@ static int extend_abbrev_len(const struct object_id *oid,
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;