OpenBagTwo / gsb

A tool for managing incremental backups of your save states using Git!
https://openbagtwo.github.io/gsb/
GNU General Public License v3.0
0 stars 0 forks source link

Delete a backup #8

Closed OpenBagTwo closed 9 months ago

OpenBagTwo commented 1 year ago

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

OpenBagTwo commented 10 months ago

Note that this functionality is going to be largely cosmetic, as libgit2 doesn't actually have functionality to delete or repack objects. See: https://github.com/OpenBagTwo/gsb/issues/9#issuecomment-1737568323

It's worth noting that this functionality is not available in the underlying library: https://github.com/libgit2/libgit2/issues/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 commented 9 months ago

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