mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-06 13:25:18 +00:00
odb_pack: don't do ambiguity checks for fully qualified SHA1 hashes
This makes libgit2 more closely match Git, which only checks for ambiguous pack entries when given short hashes. Note that the only time this is ever relevant is when a pack has the same object more than once (it's happened in the wild, I promise).
This commit is contained in:
parent
3eaf34f4c6
commit
b2a2702da2
@ -722,7 +722,7 @@ static int pack_entry_find_offset(
|
||||
}
|
||||
}
|
||||
|
||||
if (found && pos + 1 < (int)p->num_objects) {
|
||||
if (found && len != GIT_OID_HEXSZ && pos + 1 < (int)p->num_objects) {
|
||||
/* Check for ambiguousity */
|
||||
const unsigned char *next = current + stride;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user