aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-02-20git-branch-list(checkout_branch): Error if ID is invalidTeddy Wing
If the given ID doesn't correspond to a branch in our database, we should exit with an error.
2018-02-20git-branch-list: Verify ID is an integer before doing `checkout`Teddy Wing
When running: $ git branch-list 2 we want to ensure the argument "2" in the example above is an integer. If so, we take it to represent a branch-list ID. Otherwise an error code should be returned. Thanks to Peter Ho on StackOverflow for the neat Bash integer test: https://stackoverflow.com/questions/2210349/bash-test-whether-string-is-valid-as-an-integer/19116862#19116862
2018-02-20git-branch-list(save_branch): Don't add branch if already savedTeddy Wing
Don't add existing branches to the database. We don't want any duplicate branch names cluttering the shortcut list.
2018-02-20Add initial draft of `git-branch-list`Teddy Wing
A Git add-on that stores a list of branch names and allows you to quickly switch to any branch in the list. This enables you to more quickly switch between branches that you're working on or reviewing without having to either remember or look up the beginnings of the names of the branches. Currently provides basic functionality for saving and dropping branches from the list, printing the list, and checking out a branch in the list. The branch list "database" is stored in a text file in the `.git/info/` directory local to the project. Perhaps worrisome to store an external file in the internal Git directory, but this allows us to keep the database local to the current project and maintain different databases for different projects.