什么是 git-remote-http prcess,为什么有这么多 git 进程



我在shell中找不到git-remote-http命令,为什么会有这样的过程?

我只打开了一个 Git SVN 进程,为什么有这么多 Git 相关进程?

[mirror@home git]$ pgrep git
12035
12036
22308
22309
22394
22397
24128
24129
26136
26137
[mirror@home git]$ pgrep git -lf
12035 git fetch origin
12036 git-remote-http origin http://git.savannah.gnu.org/r/weechat.git/
22308 git svn clone http://code.taobao.org/svn/obconnector/
22309 /usr/bin/perl /home/mirror/ins_git/libexec/git-core/git-svn clone http://xxx.org/svn/xxx/
22394 git update-index -z --index-info
22397 git hash-object -w --stdin-paths --no-filters
24128 git fetch origin
24129 git-remote-http origin http://git.xxx.org/xxx.git/
26136 git fetch origin
26137 git-remote-http origin http://git.xxx.org/xxx.git/ 

它被称为远程助手

当 Git 需要与 Git 本机不支持的远程存储库进行交互时,它们由 Git 调用。
给定的帮助程序将实现此处记录的功能子集。

当 git 需要使用远程帮助程序与存储库交互时,它会 将帮助程序生成为独立进程,将命令发送到帮助程序的标准输入,并期望从帮助程序的标准输出中获得结果。

请注意,在 Git 2.11(2016 年第 4 季度(之前,"git fetch http::/site/path"(这是一个无效的 url(不会正确死亡,而是会出现段错误。

参见 提交 d63ed6e (08 Sep 2016( by Jeff King ( peff (。
(由Junio C Hamano -- gitster -- 在提交 c13f458 中合并,2016 年 9 月 15 日(

remote-curl:处理没有协议的网址

通常remote-curl永远不会看到开头没有" proto: "的 URL,因为这就是告诉 git 运行"git-remote-proto"帮助程序的原因(git-remote-http等是git-remote-curl的别名(。

但是,特殊语法"proto::something"将git-remote-proto运行,只有"某物"作为URL。
所以一个格式错误的 URL,例如:

http::/example.com/repo.git

将网址"/example.com/repo.git"提供给git-remote-http
生成的 URL 没有协议,但 372370f 添加的代码(http:使用凭据 API 处理代理身份验证,2016-01-26(无法处理这种情况和段错误。


Git 2.13(2017 年第 2 季度(通过确保"智能 HTTP"远程对此进行了扩展帮助程序了解如何--push-options处理通过外部远程帮助程序接口。

请参阅提交 511155d,提交 eb7b974 (2017 年 3 月 22 日( by 布兰登·威廉姆斯 ( mbrandonw (。
(由Junio C Hamano -- gitster -- 在提交 4e87565 中合并,2017 年 3 月 27 日(

remote-http 进程现在可以接收选项,因为 git send-pack 具有:

--push-option=<string>

将指定的字符串作为推送选项传递,供服务器端的钩子使用。 如果服务器不支持推送选项,则出错。


Git 2.14 确实强制执行推送选项验证。

请参阅提交 cbaf82c (09 May 2017( 和提交 b7b744f (08 May 2017( by Jonathan Tan ( jhowtan (。
(由Junio C Hamano - gitster - 合并于提交3c98008,2017年5月23日(

接收包程序现在确保推送证书记录用于推送的同一组推送选项。

每个 http 请求都有一个单独的进程。有许多客户端请求该服务,因此有许多 git 进程。

最新更新