Git 提交生成数
什么是 git 提交生成编号(黑客新闻链接)以及它们的意义是什么?
What are git commit generation numbers (hacker news link) and what are their significance?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
什么是 git 提交生成编号(黑客新闻链接)以及它们的意义是什么?
What are git commit generation numbers (hacker news link) and what are their significance?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
只需添加到 siri 的 答案,“提交生成编号”为:
正如黑客新闻线程提到的:
莱纳斯:
关于在哪里缓存该信息(或者是否应该缓存)仍然存在争议,但从用户的角度来看,它仍然是关于一些“容易记住”的信息(这不是提交生成的目标)数字):
Just to add to siri's answer, "Commit Generation Numbers" are:
As the Hacker news thread mentions:
Linus:
There is still a debate as to where to cache that information (or if it should be cached), but for the user point of view, it still is about some "easy to remember" information (which isn't the goal of commit generation number):
问题(如 [email protected] 上的线程中暗示的)是我们信任的DAG方向被统计反方向,从分支头向后穿过血统。生成编号(即使在提交时记录)是通过后代进行计数的。另外,我们经常在不同的(分布式)存储库中混淆感知的历史 - 因此出现了所有问题。
只需阅读 Linus 的最新,除了他对重命名的误读(我认为 George Spelvin 同意他的观点 - 不要在存储库中记录重命名,只需拍摄快照),他确实指出:
The problem (as implied in the thread on [email protected]) is that the DAG direction that we trust is counted in the reverse direction, from branch head back through parentage. The generation numbers (even if recorded at commit time) are counted through descendants. Plus we mess with the perceived history often in our different (distributed) repos - hence all the issues.
Just read Linus's latest, apart from his misreading about renames (I think George Spelvin was agreeing with him - do not record renames within the repo, simply take snapshots), he does point out that: