[Sputnik-list] luasvn backend

Andre Carregal carregal at fabricadigital.com.br
Mon Dec 3 19:50:44 GMT+3 2007


On Dec 3, 2007 8:04 PM, Enrico Tassi <gareuselesinge at libero.it> wrote:
> I've been checking for a libgit or something. It seems there is a google
> summer of code project libgit-thin but last commit is not that recent...
> There are perl bindings made calling the binaries direcly, but I don't
> like that much...

True, most of the git wrappers use the commands directly, which I
agree is not very interesting for a Lua bind.

> Do you know other attempts to build a git API?

I suggest keeping track of Libification, described in SoC 2007 as

"Make more parts of libgit.a reentrant by removing static variables,
avoid dying e.g. when malloc() fails, etc. Most of Git was written
with the run-once-and-exit design pattern. This makes it
difficult/impossible to embed core Git data access routines within a
scripting language such as Perl or Python, or to embed it in a
longer-running server such as an Apache module. Existing code must be
modified to return errors rather than terminating the process, and
memory leaks need to be plugged."

Until Libification is in place things are not going to be easy at all,
unless someone know of a Rings like module for C... :o)

But assuming some kind of bind (even if not reentrant) is doable, we
can always try to use it CGI like.

I guess you can take a peek at http://hjemli.net/git/cgit/, a web
front end in C that uses libgit.a. Although I haven't checked yet how
it works it may be a starting point for a CGI like bind study.

Or you may want to check how Linus was playing with the issue around 2006:
http://marc.info/?l=git&m=114076345427378&w=2

André



More information about the Sputnik-list mailing list