简体   繁体   English

具有增量更新的版本控制系统

[英]Version control system with incremental updates

I want to build an automatic update system for a game that I am working on and I thought I could just use an existing version control system for this purpose. 我想为我正在开发的游戏构建一个自动更新系统,并且我认为我可以为此目的使用一个现有的版本控制系统。

My game consists of many small files and at the moment I am just using git with a git pull. 我的游戏包含许多小文件,目前我只是在git pull中使用git。 So every time the client starts it does a git pull to always get to the newest version. 因此,每次客户端启动时,它都会进行git pull以始终获取最新版本。

But the small problem that I have is that as far as I know git doesn't allow incremental updates. 但我有一个小问题,就我所知,git不允许增量更新。 This means that if I do a git pull and it gets interrupted the whole update is lost because otherwise the local git repo would be in an inconsistent state. 这意味着如果我执行git pull并使其中断,则整个更新将丢失,因为否则本地git repo将处于不一致状态。

I already knew that I might have abused git a bit but I am wondering if there are other version control system that allow an incremental git pull. 我已经知道我可能会滥用git,但是我想知道是否还有其他允许增量git pull的版本控制系统。

Does something similar exist? 是否存在类似的东西?

I think git pull already does what you want. 我认为git pull已经可以满足您的需求。

A pull is a fetch followed by a merge. 拉是在获取之后进行合并。 So, if fetch gets interrupted, nothing has been changed in your working dir (that would only be done by the final merge, once all objects have been transferred). 因此,如果取回被中断,则您的工作目录中没有任何更改(只有在所有对象均被传输后,最终合并才能完成)。

What I'm not sure about now, is whether after an interrupted fetch, a subsequent fetch would resume or if it would start anew. 我现在不确定的是,在中断获取之后,是否将继续进行后续的获取还是重新开始。 I would bet it's the first option (resume), but I'm not sure just now. 我敢打赌,这是第一个选择(恢复),但我不确定现在。 Try it (turn off network in the middle of a fetch, for example). 尝试一下(例如,在获取过程中关闭网络)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM