Unable to extract a pack entry from irs-manual-demo.git
Current behavior 😯
Hi.
I tried to perform gix clone https://github.com/Unstructured-IO/irs-manual-demo.git
gix version: v0.37.0-503-g37c1e4c91 (i.e. latest HEAD).
I get:
Error: A pack entry could not be extracted
Caused by:
The object a34aa97bb731bf5ca3a5831d8cef177235ed2265 could not be decoded or wasn't found
Expected behavior 🤔
It should work.
Git behavior
git clone succeeds.
Steps to reproduce 🕹
To reproduce, build latest gix, clone the repo, and see it fail.
Thanks a lot for reporting! This is another incantation of this issue.
In short, the problem is that gitoxide can currently only handle delta-packs with ref-deltas pointing to objects already present in the object database. This is the case for typical efficient packs, but not every server side generates these, and apparently it's also possible to sneak these into GitHub which apparently doesn't recompress them completely.
This isn't easily fixable, as it requires an entirely different implementation of the resolver which right now is lightning fast, but only because it assumes efficient packs. The word efficient here means that it's always better to refer to a base object by its high-byte encoded offset into the same pack instead of by a fixed 20 byte SHA1.