Search code examples
libgit2pygit2

libgit2 / pygit2 is there a way to do an update-server-info?


I need to prepare a repo for access from an HTTP server.

To do seem it seems I need to run git update-server-info on the repo which updates some files that make it accessible over a dumb HTTP server.

I am using Pygit2 / Libgit2 to create the repo. Does libgit2 allow me to do a update-server-info or do I need to somehow execute the command line git to do so?

I have searched extensively so if it is available then I'm looking in the wrong places to find how.


Solution

  • libgit2 does not offer any support for the dumb HTTP protocol, but since this is the server, it wouldn't help much it implemented update-server-info.

    In order to support the dumb protocol you need to make git update-server-info run after every push into the server's repo via one of the hooks which git provides, so you need to be using git for this anyway.