From 96b4780727b49a2c30c640a73751566f60ffc2af Mon Sep 17 00:00:00 2001 From: Dennis Keitzel Date: Sun, 11 Jun 2017 04:57:28 +0200 Subject: Gracefully handle bare repositories on API operations. (#1932) Signed-off-by: Dennis Keitzel --- models/repo_branch.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'models/repo_branch.go') diff --git a/models/repo_branch.go b/models/repo_branch.go index fcfd3e8ecb..4821902e37 100644 --- a/models/repo_branch.go +++ b/models/repo_branch.go @@ -39,7 +39,7 @@ func GetBranchesByPath(path string) ([]*Branch, error) { // GetBranch returns a branch by it's name func (repo *Repository) GetBranch(branch string) (*Branch, error) { if !git.IsBranchExist(repo.RepoPath(), branch) { - return nil, &ErrBranchNotExist{branch} + return nil, ErrBranchNotExist{branch} } return &Branch{ Path: repo.RepoPath(), -- cgit v1.2.3