gpt4 book ai didi

git rev-list 无限挂起

转载 作者:行者123 更新时间:2023-12-02 13:46:32 33 4
gpt4 key购买 nike

如果我这样做 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/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com