mirror of
https://github.com/dolthub/dolt.git
synced 2026-05-24 19:48:41 -05:00
Revert "Ensure we search back to the first matching prefix"
This reverts commit 89dcf7d7a49366c98e3138586c88b6f1940bea84.
This commit is contained in:
@@ -427,12 +427,6 @@ func (ar archiveReader) search(hash hash.Hash) int {
|
||||
return -1
|
||||
}
|
||||
|
||||
// roll backwards to find the first instance if there are multiple with the same prefix, and the search didn't find
|
||||
// the first.
|
||||
for possibleMatch > 0 && ar.indexReader.getPrefix(uint32(possibleMatch-1)) == prefix {
|
||||
possibleMatch--
|
||||
}
|
||||
|
||||
for idx := uint32(possibleMatch); idx < ar.footer.chunkCount && ar.indexReader.getPrefix(idx) == prefix; idx++ {
|
||||
if ar.indexReader.getSuffix(idx) == suffix(targetSfx) {
|
||||
return int(idx)
|
||||
|
||||
Reference in New Issue
Block a user