diff options
Diffstat (limited to 'routers/repo/branch.go')
-rw-r--r-- | routers/repo/branch.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/routers/repo/branch.go b/routers/repo/branch.go index ea4f68948d..7127d50ed8 100644 --- a/routers/repo/branch.go +++ b/routers/repo/branch.go @@ -17,7 +17,6 @@ import ( "code.gitea.io/gitea/modules/repofiles" repo_module "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/util" - "gopkg.in/src-d/go-git.v4/plumbing" ) const ( @@ -253,7 +252,7 @@ func loadBranches(ctx *context.Context) []*Branch { repoIDToGitRepo[pr.BaseRepoID] = baseGitRepo } pullCommit, err := baseGitRepo.GetRefCommitID(pr.GetGitRefName()) - if err != nil && err != plumbing.ErrReferenceNotFound { + if err != nil && !git.IsErrNotExist(err) { ctx.ServerError("GetBranchCommitID", err) return nil } |