clone/gogit currently handles SHA-256 repositories through the native Git fallback. The goal is to use its in-process blob reader against repositories created with the planned Git 3.0 SHA-256 default, including environments where the git binary is unavailable.
At current main (38dd5d96de0badd456ee2cba58db357334822613), the module pins github.com/go-git/go-git/v5 v5.19.2. readBlobWithGoGit rejects object IDs longer than 40 characters with go-git v5 does not support 64-character object IDs. Blob and InspectBlob then invoke native Git. Removing Git from PATH exposes the failure.
Using Git 2.55.0, this reproduces it:
cd gogit
GIT_DEFAULT_HASH=sha256 GIT_DEFAULT_REF_FORMAT=reftable go test ./...
The failing public API tests report both the 64-character object ID error and exec: "git": executable file not found in $PATH. The same run with GIT_DEFAULT_HASH=sha1 and GIT_DEFAULT_REF_FORMAT=reftable succeeds, so reftable alone does not block this object-store reader.
Track the move to go-git v6 after its SHA-256 work is ready:
The change should migrate the module and imports to v6, replace the fixed 40-character assumptions with hash-format-aware handling, and cover Blob and InspectBlob with native Git absent for SHA-256 repositories using both files and reftable reference storage.
clone/gogitcurrently handles SHA-256 repositories through the native Git fallback. The goal is to use its in-process blob reader against repositories created with the planned Git 3.0 SHA-256 default, including environments where thegitbinary is unavailable.At current
main(38dd5d96de0badd456ee2cba58db357334822613), the module pinsgithub.com/go-git/go-git/v5v5.19.2.readBlobWithGoGitrejects object IDs longer than 40 characters withgo-git v5 does not support 64-character object IDs.BlobandInspectBlobthen invoke native Git. Removing Git fromPATHexposes the failure.Using Git 2.55.0, this reproduces it:
The failing public API tests report both the 64-character object ID error and
exec: "git": executable file not found in $PATH. The same run withGIT_DEFAULT_HASH=sha1andGIT_DEFAULT_REF_FORMAT=reftablesucceeds, so reftable alone does not block this object-store reader.Track the move to go-git v6 after its SHA-256 work is ready:
The change should migrate the module and imports to v6, replace the fixed 40-character assumptions with hash-format-aware handling, and cover
BlobandInspectBlobwith native Git absent for SHA-256 repositories using both files and reftable reference storage.