https://github.com/cbdevnet/libgit2-backends/blob/master/pos...
https://github.com/cbdevnet/libgit2-backends/blob/master/pos...
Incredible to get two implementations.
I really appreciate that you've made this happen.
Is this built from scratch or a port of one of the existing drivers? Did you have a chance to have a look at the other implementation - what do you see as the major differences?
Any thoughts of submitting to the libgit2 project?
As for the implementation by mhodgson, one thing I noticed is that it uses the slightly newer PQexecPrepared API, which only works from protocol version 3.0 and upwards (which was introduced with PostgreSQL 7.4, so not really a problem). He also seems to use some more calls to the libgit2 API, mainly for copying and creating buffers for SQL statements (which I did with static allocation, at the expense of having hardcoded schema and table names).
All in all, mhodgson's implementation seems more feature-complete (and well-tested) than mine, yet also considerably more complex.
As for submitting it, I'd like to have some confirmation that it works first :) Unfortunately, I'm currently too busy to really set up some tests for it, but once I have the time, I just might ;)