如何gitolite调用git-receive-pack?

时间:2016-04-02 03:11:40

标签: git gitolite

我知道,例如,用户在客户端运行命令如“git clone git @XXXX:Test.git”,然后在服务器中,由于authorized_keys的“命令”选项,调用gitolite-shell,如果拒绝,gitolite退出,但如果允许,gitolite会调用'git-receive-pack'。所以,我的问题是Gitolite如何调用'git-receive-pack'或'git-upload-pack',它有什么作用?

1 个答案:

答案 0 :(得分:0)

作为larsks comments,您可以直接search for that term in gitolite sources

您将在src/gitolite-shell中看到系统调用:

$ bash joinarray.sh dat/f1.txt dat/f2.txt
Head1 HeadA HeadFoo
1     a     nan
2     b     nan
nan   c     bar

然后,您可以参考documentation of git receive-pack了解更多信息:

  

此命令通常不会由最终用户直接调用   协议的UI位于 trace( 2, "gitolite command", $soc ); _system( "gitolite", @words ); 侧,程序对用于将更新推送到远程存储库