You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then make a CAR for the HEAD commit (this will include ancestors, trees and blobs thanks to the git-raw codec):
$ ipfs dag export "$(printf 'f01781114%s' "$(git rev-parse HEAD)")" > HEAD.car
0s 986 B / ? [---------------------------=-------------------------------------------------] 54.57 KiB/s 0s
$ car inspect HEAD.car
Version: 1
Roots: baf4bcfa4mqpx36fgtkm4boy3dilan7y3muggpbi
Root blocks present in data: Yes
Block count: 10
Min / average / max block length (bytes): 13 / 68 / 239
Min / average / max CID length (bytes): 24 / 24 / 24
Block count per codec:
git-raw: 10
CID count per multihash:
sha1: 10
car inspect seems happy. Now let's say we want to make a smaller CAR with just the latest tree, ignoring all the history and commit info:
$ car get-dag HEAD.car "$(printf 'f01781114%s' "$(git rev-parse HEAD^{tree})")" > TREE.car
2025/03/12 00:52:58 could not choose a decoder: no decoder registered for multicodec code 120 (0x78)
It seems like the git-raw multicodec isn't supported, and I couldn't find any run-time or compile-time options to adjust the supported codecs (though I might have missed it, since I'm not familiar with Go).
The text was updated successfully, but these errors were encountered:
I thinkhttps://github.com/ipfs/go-ipld-git should be compatible enough with the interfaces here to just pull in. If you want to contribute this you could open a PR to:
go get github.com/ipfs/go-ipld-git
Then put _ "github.com/ipfs/go-ipld-git" near the top of the file @
I can't seem to extract
git-raw
DAGs.For example, if we add a Git repo to Kubo:
Then make a CAR for the HEAD commit (this will include ancestors, trees and blobs thanks to the
git-raw
codec):car inspect
seems happy. Now let's say we want to make a smaller CAR with just the latest tree, ignoring all the history and commit info:It seems like the
git-raw
multicodec isn't supported, and I couldn't find any run-time or compile-time options to adjust the supported codecs (though I might have missed it, since I'm not familiar with Go).The text was updated successfully, but these errors were encountered: