How are git-raw IPLD nodes created?

Among the examples given for exploration in the IPFS Web UI, there is the CID z8mWaJHXieAVxxLagBpdaNWFEBKVWmMiE which is of type “git-raw”. I assume that it was somehow generated from a git repository, but how? I found various explanations of how to store git repositories in IPFS, but they only store the git objects as plain files, so the CIDs will be of type dag-pb.

You can traverse a range of data structures using ipld.

Here you can find ipld codec for git objects allowing path traversals across the git graph:

Also, there are tons of codecs for ethereum, bitcoin, torrent, ZCash etc. Here is a list of them.

Thanks, that solves a part of the mystery!

But I am still wondering how the example repository was transferred to IPFS. Using the standard DAG API, I’d have to convert each git object into the correct JSON syntax first, which is certainly possible, but equally certainly cumbersome.

I looked a bit at the raw blocks in that example repository. Their contents looks similar to the output of git cat-file, but it isn’t quite the same (for example, there’s a zero byte after the length field). So I suspect that someone has written a script to convert the git objects from a repository to DAG nodes, and I’d really like to see that script.