git mergetool
命令性能似乎相当慢,尤其是与 hg merge
相比。这是一个记录在案的问题吗?有什么方法可以加快速度吗?
在运行命令时,我们花了很多时间等待每个文件差异的显示。
最佳答案
Git 2.23(2019 年第三季度,五年后)应该会有所改善,因为“git mergetool
”及其测试现在产生更少子进程。
参见 commit 7e6d6f7 , commit 8b01465 , commit e10dffd (2019 年 6 月 12 日),和 commit b4a04c8 (2019 年 6 月 10 日)作者:Johannes Sixt (j6t
) .
(由 Junio C Hamano -- gitster
-- merge 于 commit 2950cbd ,2019 年 7 月 9 日)
mergetool
: use shell variable magic instead ofawk
git-mergetool
spawns an enormous amount of processes.For this reason, the test script,
t7610
, is exceptionally slow, in particular, on Windows.
Most of the processes are invocations ofgit
. There are also some that can be replaced with shell builtins.
Avoid repeated calls ofgit ls-files
andawk
.
关于Git mergetool 性能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31734334/