fix(storage): make cleanup delete the backups it lists - #18
Merged
Merged
Conversation
Storage cleanup removed only the ZIP copy of an unprotected backup and left its Git snapshot and catalog entry in place, so the backup was still there after the cleanup and after a restart. An unprotected backup is now deleted the same way the Delete button deletes it: Git snapshot, remote copy, ZIP, and catalog record. Compaction now keeps exactly the LFS objects that a remaining snapshot points at and removes the rest. The old `git lfs prune` path failed in a bare repository and could not tell a deleted snapshot from a kept one. A protected backup that loses its local Git copy keeps its synchronized remote copy in the catalog instead of orphaning the ref on the remote.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Storage cleanup did not delete the backups it listed. For a backup the keep settings do not protect, it removed only the ZIP copy and left the Git snapshot and the catalog entry in place. The backup was still there after the cleanup and after a restart, so the only way to really remove it was the Delete button. The
git lfs prunestep in compaction also failed in a bare repository, so Git space was only ever freed when every local snapshot went at once.An unprotected backup is now deleted the same way the Delete button deletes it: Git snapshot, remote copy, ZIP, and catalog record, with a deletion marker so the catalog rebuild at startup does not bring it back. Compaction keeps exactly the LFS objects that a remaining snapshot points at and removes the rest, and it drops the world's history ref so a later rebuild cannot recreate a deleted snapshot without its content. A protected backup that loses its local Git copy keeps its synchronized remote copy in the catalog instead of orphaning the ref on the remote. The preview and confirmation screens say what is deleted where.
Two new integration tests run against real git and git-lfs: unprotected backups are removed everywhere and their LFS objects freed while the kept snapshot still verifies, and a protected backup keeps its remote copy when its local Git copy is evicted.
Prepares release 0.3.7.1.
Made by Claude Fable 5.1 in Claude Code.
🤖 Generated with Claude Code