Merge branch 'jc/longer-disambiguation-fix'

"git rev-parse --short" and friends failed to disambiguate two
objects with object names that share common prefix longer than 32
characters, which has been fixed.

* jc/longer-disambiguation-fix:
  abbrev: allow extending beyond 32 chars to disambiguate
main
Junio C Hamano 2025-09-18 10:07:01 -07:00
commit d29cbbbf36
1 changed files with 1 additions and 1 deletions

View File

@ -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;