8 ms·
Have you tried https://github.com/davidbalbert/libgit2-postgresql https://github.com/davidbalbert/libgit2-postgresql? I know nothing about libgit2, but came acr
by adwmayer 11y ago
Have you tried https://github.com/davidbalbert/libgit2-postgresql https://github.com/davidbalbert/libgit2-postgresql? I know nothing about libgit2, but came across this repo while looking it up. If it's got some issues it's a great place to start from, since it also gives you somebody who could code review and you don't need to start completely from scratch.
- lunixbochs 11y agoI did a quick review. This project uses PQescapeLiteral() and asprintf() to build queries. I'd recommend prepared statements over this approach (which is how the MySQL backend builds queries). It doesn't implement anything but write() and free() yet, so it's not actually functional. Unfortunately I believe this would clobber the library license (GPLv3 on this Postgres plugin vs GPLv2 with a linking exception for libgit). With this in mind I'd probably just recommend a rewrite. It's not that much code. Update: it looks like the libgit2 backends aren't well maintained: https://github.com/libgit2/libgit2-backends/issues/13#issuecomment-112319590 https://github.com/libgit2/libgit2-backends/issues/13#issuec...
- andrewstuart 11y agoI did notice it's a different license. Do you think there is value in porting the MySQL or SQLite version? They would share the libgit2 license.
- andrewstuart 11y agoWould you mind casting your expert eye please over the solution that has magically arrived in this thread? I'd be interested in your thoughts.