aboutsummaryrefslogtreecommitdiffstats
path: root/git-checkout-store/main.go
AgeCommit message (Collapse)Author
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-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-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