Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要准备一个用于从 HTTP 服务器访问的存储库。
看起来我需要在 repo 上运行 git update-server-info 来更新一些文件,使其可以通过一个愚蠢的 HTTP 服务器访问。
我正在使用 Pygit2 / Libgit2 创建存储库。libgit2 是否允许我执行 update-server-info 或者我需要以某种方式执行命令行 git 来执行此操作?
我已经进行了广泛的搜索,所以如果它可用,那么我在错误的地方寻找方法。
libgit2 不提供对愚蠢 HTTP 协议的任何支持,但由于这是服务器,因此它对实现没有太大帮助update-server-info。
update-server-info
为了支持愚蠢的协议,您需要git update-server-info在每次通过 git 提供的钩子之一推送到服务器的 repo 后运行,因此无论如何您都需要使用 git。
git update-server-info