A pure OCaml implementation of Git's storage format and network protocols for reading and writing Git objects.
ocaml-git is a low-level OCaml library that provides pure OCaml implementations of Git's on-disk storage format and network protocols. It enables reading and writing all core Git objects—blobs, trees, commits, and tags—along with pack files, pack indexes, and index files, making it system-agnostic and suitable for MirageOS unikernel deployments.
OCaml developers building tools that require low-level Git manipulation, such as the Irmin distributed database, or those working on MirageOS unikernels where system-agnostic Git operations are needed.
Developers choose ocaml-git for its pure OCaml implementation, which ensures portability across systems, and its focus on reliable low-level Git primitives without high-level commands, making it ideal as a foundational library for higher-level tools.
Pure OCaml Git format and protocol
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Implemented entirely in OCaml, making it system-agnostic and ideal for MirageOS unikernels where external Git binaries are not available, as highlighted in the README.
Supports reading and writing all core Git objects, pack files, and indexes with a consistent interface, enabling precise manipulation for tools like Irmin, as detailed in the features.
Handles cloning and fetching via Git protocol, smart-HTTP, and git+ssh with capabilities like thin-pack and ofs-delta, providing flexible remote interaction without relying on external Git.
Offers in-memory and Unix filesystem store implementations, allowing for various deployment scenarios from testing to production, as described in the store abstractions section.
Pushing is still experimental and needs more testing, limiting reliability for production workflows that require robust synchronization, as admitted in the README.
Uses linking-trick libraries (digestif, checkseum) that require explicit implementation choices, which can be cumbersome with build systems like utop or ocamlbuild, not just dune.
Lacks built-in support for common Git commands like diff, status, merge, and rebase, forcing developers to implement these separately or rely on other libraries, as stated in the philosophy.