From ea03b4335528cf741b29df1403680f11e56722b1 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Fri, 26 Dec 2014 19:17:35 -0500 Subject: git-checkout-store: Print `git checkout` stderr output 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`. --- git-checkout-store/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git-checkout-store') diff --git a/git-checkout-store/main.go b/git-checkout-store/main.go index 335bd02..ae3ff27 100644 --- a/git-checkout-store/main.go +++ b/git-checkout-store/main.go @@ -16,7 +16,7 @@ func main() { cmd := exec.Command("git", "checkout", args[0]) var out bytes.Buffer - cmd.Stdout = &out + cmd.Stderr = &out err := cmd.Run() if err != nil { fmt.Fprintf(os.Stderr, err.Error()) -- cgit v1.2.3