gitr - pure ruby git command line client November 27
I’ve been working on getting as much as possible of my Ruby/Git library to run in pure ruby rather than forking out to the git binary, and luckily the guys that started the gitrb project some time ago let me incorporate their code into mine. Now I have quite a bit of my gitweb camping app running without calling ‘git’ at all. Only the archive and diff methods are currently invoked - everything else is in pure ruby.
The other cool thing I get from this that I’ve done a simple command line client that does a number of git functions without needing git compiled on the machine at all:
$ gitr log $ gitr branches $ gitr ls-tree (sha) $ gitr cat-file (sha) $ gitr rev-parse v1.0.2
All of those are run without forking out to the git binary. Sweet. You can get this code at my Repo.or.cz Ruby/Git repo. I will release it as a new gem soon.

topfunky Dec 11
Fascinating! I talked to a few Rubyists about this and they didn’t think it was worth doing.
I’d love to hack on Git, but some of the code is not the kind of code I like to write (shell scripts, solo Perl scripts, etc.). Being able to enhance it in Ruby would be a great benefit.
Scott Dec 11
Yeah - one of the cool things about git is that the data store is really pretty simple and hasn’t really changed in forever, so once you get the basic read/write stuff done, there is a lot you can do without having to use the actual git code at all.
I was planning on trying to write bindings to libgit, but it may be better to just re-implement the core stuff in pure ruby.