-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sync to git #441
Comments
This is probably a bit much for a "good first issue", but maybe consider it a "good second issue"! |
I had a think about how we might want to do this. We need to implement the Server trait, and specifically The naming for versions, snapshots, and For For
I had a look at git2, and it looks pretty complex even just to do these two operations. Maybe it's better to just shell out to We'll also need to think about how this will be used, and abused. I suspect the folks requesting Git as a sync mechanism have very different ideas of how this might work, and would be tempted to muck about in the Git repo themselves. The usage I'm aiming for is an "origin" repo, which might be GitHub or a repo on a VPS somewhere accessible from SSH. It is very much not a peer-to-peer thing where changes are manually We've already had some folks doing weird things with the sync server's database, and they've led to sadness. I guess the question to ask before embarking on a Git sync is: will this become an attractive nuisance, tempting users to "tinker" in ways that ultimately break their task databases? If so, maybe we shouldn't do it! |
That's a good assessment! Most of those options are free, too.
I suppose the most problematic scenario would be a misuse that sort-of works, like using SyncAll to sync sqlite repos. Then when it eventually fails, the users are surprised. I suspect most scenarios with a Git sync would either work just fine (e.g., storing tasks in a git repo with other data) or immediately fail.
That's a good point. This could also be a re-clone with |
I'm going to move this to the backlog, since it doesn't seem there's a lot of interest in or demand for this functionality. |
@lauft pointed out that the sync model would map well to the Git model. We could build a server implementation wrapping Git, using a similar set of files to those in the cloud storage: a
latest
file, a bunch of version files, and a bunch of snapshot files.The
latest
file would be contentious: changing in every commit. However, that's precisely enforcing the replica invariant. Those conflicts can occur both ongit pull
(when new versions arrive) and ongit push
(iflatest
has changed sincegit pull
).The text was updated successfully, but these errors were encountered: