From f8066036afc09e07a17e77df430b0d5aac4e9240 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 6 Dec 2014 17:55:51 -0500 Subject: 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. --- git-checkout-store/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { -- cgit v1.2.3