gix clone fails on https://git.zx2c4.com/sha256-oid-test
Current behavior 😯
gix clone https://git.zx2c4.com/sha256-oid-test fails with Error: failed to fill whole buffer
Note that this repository contains only a README.md file which says "This repo is to test sha256 with git.".
Expected behavior 🤔
Should work.
Git behavior
git works.
Steps to reproduce 🕹
gix version gix v0.37.0-229-gc3f173c94
Thanks for letting me know, also where to get one of these repositories and that Git can already clone it!
It's some time out until SHA256 will be supported, but the ground-work is laid already and generally I see no problem in eventually supporting it.
FYI, another error, with the same root cause.
gix status
Error: Failed to load the git configuration
Caused by:
The key "extensions.objectFormat=sha256" was invalid
This sounds like it could be very easily worked around. In my case, I'm using Starship, which strongly depends on this tool and due to this issue, the repository detection does not work well.
While repository detection is an issue with Starship, not supporting sha256 based repositories, for any operation at all, in the meantime does sound like, this behaviour could be improved. For example, at least support a subset of features, whenever possible. If some features strongly depend on SHA256 compatibility, fine, however all others should at least work to the extent they actually can.
This sounds like it could be very easily worked around. In my case, I'm using Starship, which strongly depends on this tool and due to this issue, the repository detection does not work well.
Without SHA256 support in gix::ObjectId, it wouldn't even be able to read or interact in any way with references, or the object database. The only thing that would work is interactions with the Git configuration, which seems insufficient for even basic starship functionality.
As it stands, SHA256 support is prepared for in the entire codebase, but it will still be a lot of work to at least get essential test coverage. All that would either be contributed (possibly by jj devs), or will eventually be required by GitButler.
related or maybe duplicates #281