summaryrefslogtreecommitdiffstats
path: root/modules/git/repo_branch.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-08-28 19:28:26 +0800
committerUnknwon <u@gogs.io>2015-08-28 19:28:26 +0800
commit125d314465cd56d95761dc64220db1bd35f05b5a (patch)
tree5a266a7516f566b33585133c85c71c40fcc6e6f5 /modules/git/repo_branch.go
parentc7a4369db9d57c10e9e6b1886dbbd6bec9c521c0 (diff)
downloadgitea-125d314465cd56d95761dc64220db1bd35f05b5a.tar.gz
gitea-125d314465cd56d95761dc64220db1bd35f05b5a.zip
more clear error
Diffstat (limited to 'modules/git/repo_branch.go')
-rw-r--r--modules/git/repo_branch.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/git/repo_branch.go b/modules/git/repo_branch.go
index 726019c1b1..a4e060533c 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)