aboutsummaryrefslogtreecommitdiffstats
path: root/git-checkout-store
diff options
context:
space:
mode:
Diffstat (limited to 'git-checkout-store')
-rw-r--r--git-checkout-store/main.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/git-checkout-store/main.go b/git-checkout-store/main.go
index d02f8ad..359c4db 100644
--- a/git-checkout-store/main.go
+++ b/git-checkout-store/main.go
@@ -3,11 +3,19 @@ package main
import (
"os"
+ "os/exec"
"fmt"
)
func main() {
args := os.Args[1:]
- fmt.Println(args)
+
+ if len(args) > 0 {
+ cmd := exec.Command("git", "checkout", args[0])
+ err := cmd.Run()
+ if err != nil {
+ fmt.Fprintf(os.Stderr, err.Error())
+ }
+ }
}