Skip to content
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

Introduce option to keep full file history on Sync #62

Open
sahib opened this issue Dec 26, 2020 · 0 comments
Open

Introduce option to keep full file history on Sync #62

sahib opened this issue Dec 26, 2020 · 0 comments
Labels
enhancement Not a bug, it's a new feature or improvement minor Minor issue

Comments

@sahib
Copy link
Owner

sahib commented Dec 26, 2020

By default we're sending compressed patches over the wire on sync. Those are applied on the metadata copy of the respective remote and only contain the latest change. As an example:

  • Alice adds /file as [123]
  • Alice modifies /file to [321]
  • Alive moves /file to /move_it_move_it
  • Alive moves /move_it_move_it to /file

When bob syncs with alice a patch is send that has only this information:

  • Alice added a file with content [321]

Bob will never see the moves in between. This is probably not very interesting for him either, but there might be use cases where we also want to see intermediate modifications (e.g. to see how modifications evolved).

Recent changes allow now to send individual patches. Those are then applied individually on the remote's metadata copy via ApplyPatch() resulting in a commit each. However Sync() is only called once, producing only a single commit. We should add an option to sync (working title: --persist-history / -p) that does the following:

  • ApplyPatch() each invidual patch.and make a commit.
  • Call Sync() after applying each patch.

By default we should use the combined patch system since most users might not be interested in the intermediate history. This is also more efficient space- and time-wise.

@sahib sahib added enhancement Not a bug, it's a new feature or improvement minor Minor issue labels Dec 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Not a bug, it's a new feature or improvement minor Minor issue
Projects
None yet
Development

No branches or pull requests

1 participant