tweaks history.get_history to return short commit hashes (doesn't change what the CLI displays
makes it so that getting the history of a valid repo with no commits returns an empty list rather than raising a pygit2 error
Implements #5 so that gsb rewind <hash> or gsb rewind <tag> rewinds to that point in time and so that gsb rewind with no arguments brings up an interactive prompt that lets you choose from a set of recent backups
Tech Debt and Other Concerns
Validation Performed
Tested out running gsb rewind on the repo containing gsb:
[x] with no additional argument to check out how the prompt ends up looking
[x] with -v and -vv to check out how the prompt looks with additional information printed
[x] Also tested gsb rewind -q which just says "select a revision."
[x] with invalid commit hashes / tag names to make sure the error I got back looked good
[x] I have run mkdocs serve locally and ensured that all API docs and
changes I have made to the static pages are rendering correctly, with all links
working
[x] All tech debt concerns have been resolved, documented as issues, or otherwise
accepted
Summary
Finishes the implementation of #5
and actually rounds out Milestone 2!
List of Changes
history.get_history
to return short commit hashes (doesn't change what the CLI displaysgsb rewind <hash>
orgsb rewind <tag>
rewinds to that point in time and so thatgsb rewind
with no arguments brings up an interactive prompt that lets you choose from a set of recent backupsTech Debt and Other Concerns
Validation Performed
gsb rewind
on the repo containinggsb
:-v
and-vv
to check out how the prompt looks with additional information printedgsb rewind -q
which just says "select a revision."gsb --help
gsb rewind --help
PR Type
release
)Checklist:
mkdocs serve
locally and ensured that all API docs and changes I have made to the static pages are rendering correctly, with all links working