git rev-list 无限挂起

标签 git ssh

如果我这样做 git clone - 它完美无缺。

但如果之后我尝试使用 git pull它挂起(有时工作正常):

git 客户端版本:2.6.3

git 服务器版本:2.1.4

输出:
$ GIT_CURL_VERBOSE=1 GIT_TRACE=1 git pull 10:20:56.507549 git.c:348 trace: built-in: git 'pull' 10:20:56.508283 run-command.c:343 trace: run_command: 'fetch' '--update-head-ok' 10:20:56.508877 exec_cmd.c:128 trace: exec: 'git' 'fetch' '--update-head-ok' 10:20:56.511135 git.c:348 trace: built-in: git 'fetch' '--update-head-ok' 10:20:56.520316 run-command.c:343 trace: run_command: 'ssh' 'git@server' 'git-upload-pack '\''/vol/git/repos/repo.git'\''' 10:20:58.384437 run-command.c:343 trace: run_command: 'rev-list' '--objects' '--stdin' '--not' '--all' '--quiet'

最佳答案

五年后,随着 Git 2.29(2020 年第 4 季度)的出现,情况可能会有所改善,并且使用更多缓冲 I/O,我们过去常常在其中调用许多小型 write(2)。
commit a698d67 , commit 6af3b00 , commit 24b75fa (2020 年 8 月 12 日) 来自 René Scharfe ( rscharfe ) .
(由 Junio C Hamano -- gitster -- merge 于 commit d8488b9 ,2020 年 8 月 24 日)

upload-pack: use buffered I/O to talk to rev-list

Helped-by: Chris Torek
Helped-by: Johannes Sixt


Like f0bca72dc77 ("send-pack: use buffered I/O to talk to pack-objects", 2016-06-08, Git v2.10.0-rc0 -- merge listed in batch #3), significantly reduce the number of system calls and simplify the code for sending object IDs to rev-list by using stdio's buffering.

Take care to handle errors immediately to get the correct error code, and to flush the buffer explicitly before closing the stream in order to catch any write errors for these last bytes.

关于git rev-list 无限挂起,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33696332/

相关文章:

git - 从主目录中删除 git(使用终端/命令行)

php - ssh无法连接到php中的git服务器

git - 如何设置 CODEOWNERS 文件以排除特定用户?

git - 错误 merge 后修复 Git 仓库

git - 无法让 TeamCity 使用默认私钥向 GitHub 进行身份验证

linux - 树莓派温度项目,在树莓派上读取并在远程网络服务器上显示

ssh - 无法在ubuntu终端中输入新命令/ssh权限被拒绝

ssh - ufw防火墙意外激活后如何恢复对亚马逊EC2实例的ssh访问

c# - 为多个应用拆分 .NET 解决方案/Git 存储库

Git Bash : remote error: You can't push to git://github. com/