diff --git a/services/repository/branch.go b/services/repository/branch.go index 7254778763..0313566ed8 100644 --- a/services/repository/branch.go +++ b/services/repository/branch.go @@ -131,7 +131,7 @@ func loadOneBranch(ctx context.Context, repo *repo_model.Repository, dbBranch *g var err error divergence, err = files_service.CountDivergingCommits(ctx, repo, git.BranchPrefix+branchName) if err != nil { - log.Error("CountDivergingCommits: %v", err) + return nil, fmt.Errorf("CountDivergingCommits: %v", err) } }