gitoxide icon indicating copy to clipboard operation
gitoxide copied to clipboard

gix clone fails on https://git.zx2c4.com/sha256-oid-test

Open gl-yziquel opened this issue 1 year ago • 1 comments

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

gl-yziquel avatar Aug 23 '24 20:08 gl-yziquel

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.

Byron avatar Aug 23 '24 21:08 Byron

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.

theAkito avatar Jul 29 '25 16:07 theAkito

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.

Byron avatar Jul 30 '25 02:07 Byron

related or maybe duplicates #281

jokeyrhyme avatar Aug 19 '25 03:08 jokeyrhyme