Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
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
|
|
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.
|
|
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
|
|
This isn't an rc file (as we established previously). It's a storage
file. Rename the function to be more clear about it.
|
|
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.
|
|
Stop hard-coding the storage filename.
|
|
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.
|