My reasons for an eventual resurrection of Gitarella

You might or might not remember of gitarella, on old project of mine to write a replacement for gitweb. Some of the reasons why I started the project (like gitweb URLs being not so friendly and other things) are probably no more relevant since gitweb improved a lot. Gitarella on the other hand I didn’t work on for such a long time that now is almost certainly not working, since it’s using deprecated git commands and so on.

For a while I thought to just give up on Gitarella in favour of cgit, that is written in C and so it has to be much faster, but I didn’t look into much more because gitweb at the time was suiting my need well enough. Since lately I’ve been working on quite a lot of different projects with some simple patches or series of patches, many of which are available on git repositories which I can just republish with my patches applied as a branch, my git repositories started looking tremendously heavy for the simple gitweb.

One thing that really I can’t understand is how is it possible for gitweb not to generate any kind of cache for the pages. This is quite a mistake in my opinion; while admittedly it’s impossible to properly cache the index page, for instance, and that requires a lot of queries, the commit description pages, the patch pages and so on can easily be cached up, as they cannot really be changed (you can use the SHA1 id as index for those pages).

If I remember correctly what I was told a longish time ago, cgit does cache pages on disk, which would make it an ideal candidate, if it wasn’t that it doesn’t execute git commands at all but rather links in libgit.a; feel free to check your dev-util/git install, there is no libgit.a, that is not an officially-supported way to interface to GIT. As you can guess, I don’t like it.

So I guess I might resume my work on Gitarella, especially considering now lighttpd supports scgi, it makes it quite interesting.

Replacing gitweb

Okay, I tried using gitweb to make my git repositories available via simple HTTP, unfortunately, I think it does not really do what I need it to. For this reason, having had a dummy day today, after working the morning on the course text, I spent the afternoon and the evening working on a gitweb replacement. Actually just the first part of the afternoon as I had a support call to take care at about 1500.

Anyway, after some hours of work (and a few before to decide how to handle it), I’ve got my own web-based git repository browser. It’s not yet complete of course, as I didn’t implement any history support yet, but at least I can point directly to single files without strange handlings :P

It won’t be available on production for a few days yet, but if you want to take a look to the current code, of course in Ruby, you can find it in a git repository ;)

The name has the literal meaning in Italian of “little trip” (although in some dialects it has different meanings… a silly name, but in topic with git’s silly name ;)).

There are really few features right now, no history, no way to browse non-HEAD tree, no diffs, no ordering. Most of it was easy to hack up, I just need more time to improve it. I actually already fixed one bug of gitweb, the binary files are sent as plain text by gitweb, instead they are bypassed by gitarella.

Maybe gitarella would be the “second choice” like ViewCVS is to cvsweb and so on, who knows? ;)

But I have to admit that writing it in Ruby is proving interesting and a good experience for myself, although it requires both filemagic and liquid – the latter not even in portage, but it’s on my overlay for now.

Talking about that, I also created the new git repository for my overlay. It might not be always available as the router is really driving me crazy, also because I can only find crappy D-Links in the stores where I usually buy my stuff, and I would get high shipping costs to get it via mail, plus no direct contact with the people who are selling it to me :/

Suggestions are welcome.

It’s 2:25am, I might go to sleep now.