Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Have you tried 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.


I 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#issuec...


I 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.


Would you mind casting your expert eye please over the solution that has magically arrived in this thread? I'd be interested in your thoughts.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: