Closed OpenBagTwo closed 9 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.
Updated the OP, having rethought the UX/UI and understanding better what implementation is actually possible via libgit2
.
GIVEN Alex already has
gsb
installed on her system and is using it to track a save stateWHEN she opens a terminal, navigates to the directory where her save game lives and runs the command:
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 identifiersgsb delete
must accept any backup id in the form provided bygsb 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 withgsb rewind
). Bonus points if this can be a fully interactive multiselect.git-gc
afterwards to free up disk space