Skip to content
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

midx: fix large offset table check. #6309

Merged
merged 2 commits into from
Jun 11, 2022

Conversation

ccstolley
Copy link
Contributor

@ccstolley ccstolley commented May 20, 2022

It's insufficient to only check if the offset high order bit is set, as some object offsets may have their high order bit set but still not use the large offsets table.

We must also check to see if object_large_offsets are in use.

This can cause libgit2 to falsely claim objects do not exist when they actually do, because it is unable to find the object in the index.

cc: @lhchavez as the original author of MIDX support.

Colin Stolley added 2 commits May 20, 2022 14:00
It's insufficient to only check if the offset high order bit is set, we
must also check to see if object_large_offsets are in use.

This bug is causing objects to appear missing because they can't be
found in the index.
Though both are correct, this makes it clear that we're dealing with
the same value.
@ethomson
Copy link
Member

Thanks for the fix!

@ethomson ethomson merged commit 6bd024a into libgit2:main Jun 11, 2022
@ethomson ethomson added the bug label Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants