Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Selective commits can lead to incorrect backups #297

Open
FinnWoelm opened this issue Feb 7, 2019 · 1 comment
Open

Selective commits can lead to incorrect backups #297

FinnWoelm opened this issue Feb 7, 2019 · 1 comment
Assignees
Labels

Comments

@FinnWoelm
Copy link
Contributor

When selectively applying changes during new commit, the backup created can be incorrect. A new version will be created, which triggers a new backup request as opposed to taking any existing backup.

Here is what should be done:
When selectively committing changes, a backup will definitely already exist for the file. It's just that the backup may not have the right name.

For example, we have two backups:

  • version 1 named name 1
  • version 2 named name 2

On a selective commit, the user may want version 1 named name 2 OR version 2 named name 1 — neither of which exist in the archive.

Therefore, when creating a new version, ...

  • check if backup with same name & content already exists. If so, reuse that.
  • check if backup with content already exists (but different time). If so, duplicate that content and assign the new name.
@FinnWoelm FinnWoelm added the bug label Feb 7, 2019
@FinnWoelm
Copy link
Contributor Author

Side note: On selective commit, we should actually disable the ability to create any new backups of remote. It is never needed and if it's happening, then something is going wrong.

@FinnWoelm FinnWoelm self-assigned this Feb 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant