From 125d314465cd56d95761dc64220db1bd35f05b5a Mon Sep 17 00:00:00 2001 From: Unknwon Date: Fri, 28 Aug 2015 19:28:26 +0800 Subject: [PATCH] more clear error --- modules/git/repo_branch.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/git/repo_branch.go b/modules/git/repo_branch.go index 726019c1b..a4e060533 100644 --- a/modules/git/repo_branch.go +++ b/modules/git/repo_branch.go @@ -5,7 +5,6 @@ package git import ( - "errors" "strings" "github.com/Unknwon/com" @@ -23,7 +22,7 @@ func (repo *Repository) IsBranchExist(branchName string) bool { func (repo *Repository) GetBranches() ([]string, error) { stdout, stderr, err := com.ExecCmdDir(repo.Path, "git", "show-ref", "--heads") if err != nil { - return nil, errors.New(stderr) + return nil, concatenateError(err, stderr) } infos := strings.Split(stdout, "\n") branches := make([]string, len(infos)-1)