This repository was archived by the owner on Mar 27, 2024. It is now read-only.
This repository was archived by the owner on Mar 27, 2024. It is now read-only.
Selective commits can lead to incorrect backups #297
Open
Description
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
namedname 1
version 2
namedname 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.