aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-01-11Merge branch 'separate-branch-history-by-repository'v0.2.0Teddy Wing
2015-01-11Merge branch 'checkout-history-without-storage-file-bug'v0.1.1Teddy 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-06Merge branch 'bash-completion'Teddy Wing
2015-01-06README: Add information about shell completionTeddy Wing
A note and installation instructions for shell completion of `git-checkout-store`.
2015-01-06Add patch for git-completion.bashTeddy Wing
Add a patch file that can be used on git's git-completion.bash file. This gives `git-checkout-store` the same shell completion provided to `git checkout`. For those accustomed to git shell completion, this should make `git-checkout-store` easier to use.
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-26README: Add installation instructionsTeddy Wing
2014-12-26Add LICENSEv0.1.0Teddy Wing
MIT license.
2014-12-26README: Update with example & issuesTeddy Wing
Fill out the README with some useful information. Include a description, usage example, and a list of issues.
2014-12-26git-checkout-history: Print output from `git-checkout`Teddy Wing
When `git-checkout` is run internally as part of `git-checkout-history`, print its output to the screen. This allows us to see the "Switched to branch 'example'" text when using `git-checkout-history` so we know for sure which branch we're actually on without having to `git status`.
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-26git-checkout-store: Take arbitrary argumentsTeddy Wing
Allow arbitrary arguments to be inputted. This allows us to take flags and pass them on directly to `git-checkout`. We can now for example do git checkout-store -b some-new-branch and the command will work the same way as `git-checkout` with the added benefit of storing the branch in history.
2014-12-26git-checkout-store: Use Print instead of Println for cmd outputTeddy Wing
Since we're just outputting the output of `git-checkout`, there's already a newline at the end. We don't want to output an extra one, so just send the `git-checkout` output to the screen verbatim.
2014-12-26git-checkout-store: Print `git checkout` stderr outputTeddy Wing
Turns out `git checkout` prints to STDERR instead of STDOUT. Grab the STDERR output and print that to the screen so we can see the "Switched to branch 'x'" text when using `git checkout-store`.
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-06git-checkout-history: Store branches in checkout historyv0.0.1Teddy Wing
When checking out a branch using the git-checkout-history shorthand, store the newly checked out branch in history.
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.
2014-12-06git-checkout-history: Passing an arg checks out a branchTeddy Wing
If you pass in the index of a branch in the checkout-history branch list, the branch at that index in the history will be checked out. TODO: Store the newly checked out branch in the branch history
2014-12-06git-checkout-history: Output list of branches in historyTeddy Wing
On run, output the list of branches currently stored in git-checkout-history.
2014-12-06git-checkout-store: Prepend to the branch listTeddy Wing
Instead of appending to the end of the branch list, prepend so the 0th element is the last branch checked out.
2014-12-06git-checkout-store: .git-checkout-historyrc -> .git-checkout-historyTeddy Wing
Rename the data file because it's not actually an rc file, it's a data storage file.
2014-12-06git-checkout-store: Store branch in YAML fileTeddy Wing
Take the branch parameter and store it in a `branches` array in our YAML rcfile.
2014-12-06git-checkout-store: Create an rc file if it doesn't existTeddy Wing
Make a `.git-checkout-historyrc` file in the current user's home directory if the file doesn't exist. Resources: - [Path to home directory](http://stackoverflow.com/questions/7922270/obtain-users-home-directory) - [Cross-compilation version](https://github.com/mitchellh/go-homedir)
2014-12-06git-checkout-store: go fmtTeddy Wing
2014-12-06git-checkout-store: Try to output STDOUT from git-checkoutTeddy Wing
Not working. What I want is to output `Switched to branch 'a-branch'` from git-checkout. Using the example from: http://golang.org/pkg/os/exec/#Command
2014-12-06git-checkout-store: Run `git checkout` with argumentTeddy Wing
If an argument is passed in, run `git checkout` using that first argument to the program. Currently doesn't accept flags from git-checkout or send output from git-checkout. Ideally both of those would be supported.
2014-12-06Initial commit.Teddy Wing
* Start of README with an idea for the commands * Code to grab command line arguments with help from gobyexample.com