Skip to content

Desenfuckenate prefix lookups #3262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 26, 2015
Merged

Desenfuckenate prefix lookups #3262

merged 3 commits into from
Jun 26, 2015

Conversation

vmg
Copy link
Member

@vmg vmg commented Jun 26, 2015

They were previously fucked up since @carlosmn merged #3201

The inconspicuous fix to stop Coverity from complaining broke essentially most prefix lookups in the library where the prefix was more than 20 nibbles long. I'm glad I caught this in github/gitrpc integration testing 'cause this the kinda stuff that keeps me awake at night.

vmg added 3 commits June 26, 2015 16:45
This reverts commit 969d4b7.

This was a fluke from Coverity. The length to all the APIs in the
library is supposed to be passed in as nibbles, not bytes. Passing it as
bytes would prevent us from parsing uneven-sized SHA1 strings.

Also, the rest of the library was still using nibbles (including
revparse and the odb_prefix APIs), so this change was seriously breaking
things in unexpected ways. ^^
@ethomson
Copy link
Member

Actually, I merged that. If we're going to throw blame around, don't forget that I get some of it, too.

carlosmn added a commit that referenced this pull request Jun 26, 2015
@carlosmn carlosmn merged commit 3c7a469 into master Jun 26, 2015
@ethomson ethomson deleted the vmg/prefix-len branch January 9, 2019 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants