Ocaml-git, git design and implementation



Maybe you don’t know but we have a pure implementation of git in OCaml. This huge work was started by @samoht a few years ago. But there are a lot of planned changes to fit the need of MirageOS and, more generally, server software.

The final goal is to use (but it’s already done in some cases like Canopy) ocaml-git as a data-store of a MirageOS with Irmin. This way, it’s easy to track any update of your data-store, revert them (if you find any problem) and replicate to an usual git repository (on GitHub for example).

It is still an experimental project with open questions in term of design, interface and implementation. The big news is that there is a lot of room for improvement before the expected big release (which add lot of stuffs on ocaml-git and fix some bugs about memory consumption).

However, finding the better way for any use-case it’s not an easy task for a single or two brains. So currenlty, we have some pending questions about design and implementation which need feedback. As a good community manager, I try to explain at any step my choice, the context and possibilities. For a long time, these discussions happenned in OCamllabs (because they are particularly technical) but we came a long way, ocaml-git can be now be used, making it possible to have higher level discussion.

This topic could be a good place to report any major update which breaks API and semantic and a good way to explain step by step what is really git internally (specification, details, limitations and so on …). Finally, it could be a good entry point to participate in any way (question, explanation, documentation, or c0d3) to this big project.

And, as the first design question, you can follow this issue: https://github.com/mirage/ocaml-git/issues/286

And because I’m currently on the MirageOS retreat in Marrakech, I would like to say: good hacking!

PS: this large project is a part of a huge project, MirageOS. So, for many people, it’s difficult to see links between ocaml-git and others project (like irmin, wodan, etc.) and constraints. But don’t be afraid, we are here to help to understand globally all.