libgit2 wrapper?

Hi,

I've started using libgit2 in a project and it took a whopping 10 minutes or so to conclude that 'as is' just is not going to cut it. The whole interface screams for a modern C++ wrapper. Before I write one I thought I would check to see if anyone else here had.

Thanks!

Wrapping a git library will probably be on my roadmap before too long, because at some point I'd like to make the introjucer capable of running as a build-server and watching repositories for changes. If anyone else was interested in working on that kind of functionality, that'd be very handy!

I wrapped all the resource types, which was a big help with all the create/delete type calls that the library expects. But I only took my higher level git classes far enough to do what I needed for the project at hand. 

I'll get a little time here and there over the next couple of weeks to at least put in some of the most obvious high level helpers. Then I'll go ahead and post it. If nothing else, it shows how to do some basic git stuff that is not covered in the lib docs at all (for such a widely used library, there are some glaring holes in the documentation and samples floating around - you pretty much are expected to fully understand git internals).

jfitzpat, care to share your current work?

Sure. Uh, sorry, I have't been following JUCE's recent changes all that closely. Is there a 'standard' way to share modules now?

I know that Jules was experimenting with a module mechanism but, at a glance, I don't see a way to browse for 3rd party modules in the Introjucer.

I guess I could setup a github repo or something...

I'm just trying to get away from posting zip files here like I have in the past. They drop out of sync with Juce, don't get my later additions, etc.

You can package it up as a JUCE module: http://www.juce.com/learn/juce-module-format

I just made my first module which I'm gonna post here soon. Some gotchas regarding includes etc, as the header includes everything. I also copied Jules' style of putting forward declarations in the module's header file before the module-specific includes. 

I searched Github for "juce module" and got enough examples to get mine working. 

I believe the JUCE team are working on being able to search for 3rd party modules, and a Git wrapper would help with that I'm sure :)

Thanks!

I'll start playing with it. I ended up going pretty far with libgit2. First wrapping all the libgit2 'objects' into RAII type classes, then some higher level classes for most the common "git xxx" type operations.

If it ends up being relatively straightforward, I've got a few other modules/wrappers that might be worth sharing too.

-jjf

Please share. I'll take it as a module, or .zip, or a package dropped by a stork! :)