diff options
Diffstat (limited to 'models/repo_branch.go')
-rw-r--r-- | models/repo_branch.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/models/repo_branch.go b/models/repo_branch.go index 10931b0c..ce06c9f3 100644 --- a/models/repo_branch.go +++ b/models/repo_branch.go @@ -11,6 +11,7 @@ import ( "github.com/Unknwon/com" "github.com/gogits/git-module" + "github.com/gogits/gogs/models/errors" "github.com/gogits/gogs/pkg/tool" ) @@ -45,7 +46,7 @@ func GetBranchesByPath(path string) ([]*Branch, error) { func (repo *Repository) GetBranch(br string) (*Branch, error) { if !git.IsBranchExist(repo.RepoPath(), br) { - return nil, ErrBranchNotExist{br} + return nil, errors.ErrBranchNotExist{br} } return &Branch{ RepoPath: repo.RepoPath(), @@ -101,7 +102,7 @@ func GetProtectBranchOfRepoByName(repoID int64, name string) (*ProtectBranch, er if err != nil { return nil, err } else if !has { - return nil, ErrBranchNotExist{name} + return nil, errors.ErrBranchNotExist{name} } return protectBranch, nil } |