On Thu, Jul 31, 2008 at 04:04:50PM +0300, Boaz Harrosh wrote: > > Produce a C file and header that defines some stable API to your > GUI application, that does not expose any git internal headers. > Then compile that, say git_api.c, with C compiler in Makefile > and extern "C" link that file to your C++ application. This will > completely insulate you from any git code. While the idea of creating of such a wrapper makes sense, it may not easy to implement properly in all cases, because some git functions do not free allocated memory as they rely on this memory being free at exit. There is a problem with die() as it is not enough to longjmp from it, you have to free all resources that were allocated (such as open files, memory). Thus writing a full functional library, which will not leak resources, is not an easy task. Of course, some of Git function can be used easily without risk that your application will leak resources. Dmitry -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html