aboutsummaryrefslogtreecommitdiffstats
path: root/git-checkout-store
diff options
context:
space:
mode:
authorTeddy Wing2014-12-06 17:55:51 -0500
committerTeddy Wing2014-12-06 17:55:51 -0500
commitf8066036afc09e07a17e77df430b0d5aac4e9240 (patch)
treea3b3f7cd59616db4aa9e1b3bb77cc126ec974753 /git-checkout-store
parent8d512419cc137a2c5f9fa8a1d77fa60e1474f4a6 (diff)
downloadgit-checkout-history-f8066036afc09e07a17e77df430b0d5aac4e9240.tar.bz2
git-checkout-store: Prepend to the branch list
Instead of appending to the end of the branch list, prepend so the 0th element is the last branch checked out.
Diffstat (limited to 'git-checkout-store')
-rw-r--r--git-checkout-store/main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-checkout-store/main.go b/git-checkout-store/main.go
index f8ab43a..c2588e4 100644
--- a/git-checkout-store/main.go
+++ b/git-checkout-store/main.go
@@ -52,7 +52,7 @@ func store(branch string) {
log.Fatal(err)
}
- branchList.Branches = append(branchList.Branches, branch)
+ branchList.Branches = append([]string{branch}, branchList.Branches...)
data, err = yaml.Marshal(&branchList)
if err != nil {