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

Backup cleaner #9

Open
OpenBagTwo opened this issue Jun 25, 2023 · 1 comment
Open

Backup cleaner #9

OpenBagTwo opened this issue Jun 25, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@OpenBagTwo
Copy link
Owner

OpenBagTwo commented Jun 25, 2023

GIVEN Steve ran gsb list --verbose (#7) and noticed that his managed savegame my-savegame is taking up a ton of space

WHEN he runs the command gsb clean my-savegame

THEN gsb takes him through a series of interactive prompts that give him options for reducing the repo size, reporting after each operation how much space that operation saved* after it's completed

SO that Steve is able to keep his backups clean and organized

Notes

  • *I don't know if there's any way for git to tell you in advance how much an operation will free up.
  • Operations to perform:
    • git gc
    • If we're going with the tag approach, I guess this is where we'd go through and squash all the intermediate commits into the tags
    • Stealing leveraging some of the awesomeness of BFG is definitely on the table ("hey, did you actually want to exclude this massive do-nothing file?")
    • An interactive backup deleter (see: Delete a backup #8) ("Select the backups to delete by hash, index, or literally by checking them off one by one")
  • Steve should also be able to specify gsb clean --all which may only offer prompts for the no-regrets ops that can be applied uniformly to all repos
    • gsb clean --all is a perfect candidate for daemonization, but that's out of scope.
  • when performing any rebasing or squashing operation, it's vitally important that timestamps be preserved (see Backup history proof of concept #17) to correspond with the actual timestamp of the preserved backups (that is squashing A->B->C->D' into A->C', C' should have a commit date matching C. Further reading.
@OpenBagTwo OpenBagTwo added the enhancement New feature or request label Jun 25, 2023
@OpenBagTwo OpenBagTwo added this to the v0.1.0 Release milestone Jun 25, 2023
@OpenBagTwo
Copy link
Owner Author

It's worth noting that this functionality is not available in the underlying library: libgit2/libgit2#3247

so it would need to rely on the standalone git executable being available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant