diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-09-18 10:07:01 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-09-18 10:07:01 -0700 |
| commit | d29cbbbf367dea4015dda1b146615fcec2ea3782 (patch) | |
| tree | ce35cc902518711c29fc188aedc5b300c5ea3bf2 | |
| parent | Merge branch 'sg/line-log-boundary-fixes' (diff) | |
| parent | abbrev: allow extending beyond 32 chars to disambiguate (diff) | |
| download | git-d29cbbbf367dea4015dda1b146615fcec2ea3782.tar.gz git-d29cbbbf367dea4015dda1b146615fcec2ea3782.zip | |
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
| -rw-r--r-- | object-name.c | 2 |
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; |
