aboutsummaryrefslogtreecommitdiffstats
path: root/utils
AgeCommit message (Collapse)Author
2015-01-11Merge branch 'separate-branch-history-by-repository'v0.2.0Teddy Wing
2015-01-11utils.go: Change error message when no history fileTeddy Wing
When getting a list of branches but the file doesn't exist, print a custom error message that informs users that it's necessary to run `git-checkout-store` before `git-checkout-history` will be able to do anything.
2015-01-11utils.go: Separate history by repositoryTeddy Wing
Use a different history list for each repo. Now the YAML file is organised in this way: /path/to/repo: - branch name - branch name /path/to/another/repo: - branch name
2015-01-02utils.go: Trim trailing newline on repo directoryTeddy Wing
The repository directory location string had a trailing newline at the end which I don't want because this is going to be the key of a hash, so it doesn't make sense to have it.
2014-12-31utils.go: Add function to get current git repo pathTeddy Wing
Query git to get the current repo path. I plan on using that string as the key for branches. This will allow us to only store and query checkout history for the current repository. TODO: get rid of trailing newline
2014-12-26utils.go: Rename `OpenRCFile` -> `OpenHistoryFile`Teddy Wing
This isn't an rc file (as we established previously). It's a storage file. Rename the function to be more clear about it.
2014-12-14git-checkout-history: Put duplicated code in utils.goTeddy Wing
Extract code that was duplicated from checkout-history-store so that it now lives in a single place: the utils.go file. Add a new function to utils.go that returns the list of branches in history so that we can grab this for git-checkout-history.
2014-12-13utils.go: Extract branch storage filename to a variableTeddy Wing
Stop hard-coding the storage filename.
2014-12-06Move branch storage to utils packageTeddy Wing
Create utils package and move everything related to branch creation into the utils.go file. Then call `utils.Store` to store a branch. Doing this so I can easily store a branch in history from a `git-checkout-history` call. This is because we want to save to history even if you're checking out using the history shorthand.