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

Delete a backup #8

Closed
OpenBagTwo opened this issue Jun 25, 2023 · 2 comments · Fixed by #33
Closed

Delete a backup #8

OpenBagTwo opened this issue Jun 25, 2023 · 2 comments · Fixed by #33
Labels
enhancement New feature or request
Milestone

Comments

@OpenBagTwo
Copy link
Owner

OpenBagTwo commented Jun 25, 2023

GIVEN Alex already has gsb installed on her system and is using it to track a save state

WHEN she opens a terminal, navigates to the directory where her save game lives and runs the command:

gsb delete <commit-hash-or-tag>

THEN:
The selected backup is deleted (with the incremental changes from that backup getting squashed into the next backup)

SO that she can have a cleaner backup history (and potentially recover some disk space the next time she does a git-gc

Notes

  • gsb delete should accept multiple backup identifiers
  • gsb delete must accept any backup id in the form provided by gsb history. Supporting full commit hashes / commit short-hashes for tagged backups would be ideal but isn't a dealbreaker.
  • gsb delete with no identifiers should generate a prompt (like you get with gsb rewind). Bonus points if this can be a fully interactive multiselect.
  • In lieu of Backup cleaner #9, the user should be instructed afterwards to perform a git-gc afterwards to free up disk space
@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 OpenBagTwo modified the milestones: v0.1.0 Release, v0.0.3 Sep 26, 2023
@OpenBagTwo
Copy link
Owner Author

Note that this functionality is going to be largely cosmetic, as libgit2 doesn't actually have functionality to delete or repack objects. See: #9 (comment)

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.

Still worth doing--worst case, we should add instructions to perform a git gc manually, in lieu / in advance of #9.

@OpenBagTwo
Copy link
Owner Author

Updated the OP, having rethought the UX/UI and understanding better what implementation is actually possible via libgit2.

@OpenBagTwo OpenBagTwo mentioned this issue Oct 5, 2023
8 tasks
@OpenBagTwo OpenBagTwo linked a pull request Oct 5, 2023 that will close this issue
8 tasks
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

Successfully merging a pull request may close this issue.

1 participant