Interaly Git如何如此快速地构成文件(“学术上的“问题”)
我只是向 Git 专家提出“学术”问题。
我找不到任何关于 Git 实际上如何在内部从所有提交中组合文件的信息。 我无法想象它会迭代所有提交,直到现在(从第一个提交开始并不断更改/添加/删除等,直到它具有当前版本)。
对于具有许多提交、许多大文件等的大型代码库来说,不是很慢吗?但也许我的想象是错误的。 也许它偶尔会做一次工作,并在一些提交后保存“完整图片”以保持“组合”快速,所以它不需要从头开始,我不知道:)...类似“记忆”。
这里有人更好地理解 Git 计算当前文件时内部发生的情况吗?
I have just "academic" question for Git experts.
I could not find anything about how Git actually internaly compose files from all the commits.
I could not imagine that it iterate through all commits untill now (go from the very first commit and keep changing/adding/deleting etc. until it have current version).
Wouldn't it be slow for large codebases with MANY commits, many big files etc.? But maybe I am imagine it wrong.
Maybe it do the work once in a while and save the "complete picture" after some commits to keep the "composing" fast, so it doesn't need to start from the very beginning, I dont know :) ... something like 'memoization'.
Has anybody here better understanding of what is going on internally in Git when it figuring out current files?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论