Pure Elixir native implementation of git
WORK IN PROGRESS
This is very much a work in progress and not ready to be used in production. What is implemented is well-tested and believed to be correct and stable, but much of the core git infrastructure is not yet implemented. There has been little attention, as yet, to measuring performance.
For information about the progress of this project, please see the Xgit Reflog (blog).
Where Can I Help?
This version of Xgit replaces an earlier version which was a port from the Java implementation of git, jgit. In coming days/weeks, I'll share more about the new direction and where help would be most welcome.
For now, please see:
- Issues tagged "good first issue"
- Issues tagged "help wanted" more issues, but potentially more challenging
Why an All-Elixir Implementation?
With all of git already implemented in libgit2, why do it again?
I considered that, and then I read Andrea Leopardi:
NIFs are dangerous. I bet you’ve heard about how Erlang (and Elixir) are reliable and fault-tolerant, how processes are isolated and a crash in a process only takes that process down, and other resiliency properties. You can kiss all that good stuff goodbye when you start to play with NIFs. A crash in a NIF (such as a dreaded segmentation fault) will crash the entire Erlang VM. No supervisors to the rescue, no fault-tolerance, no isolation. This means you need to be extremely careful when writing NIFs, and you should always make sure that you have a good reason to use them.
libgit2 is a big, complex library. And while it's been battle-tested, it's also a large C library, which means it takes on the risks cited above, will interfere with the Erlang VM scheduler, and make the build process far more complicated. I also hope to make it easy to make portions of the back-end (notably, storage) configurable; that will be far easier with an all-Elixir implementation.
Xgit is heavily influenced by jgit, an all-Java implementation of git. Many thanks to the jgit team for their hard work. Small portions of Xgit are based on an earlier port from Java to Elixir; those files retain the original credits and license from the jgit project.