Add the Owner Name to differentiate when merging (#3807)

This commit is contained in:
Luo Yifei 2019-02-12 16:37:32 +08:00 committed by Lauris BH
parent baffea1ddb
commit 7884353a04
2 changed files with 6 additions and 4 deletions

View file

@ -692,8 +692,10 @@ func ParseCompareInfo(ctx *context.Context) (*models.User, *models.Repository, *
if isSameRepo {
headRepo = ctx.Repo.Repository
headGitRepo = ctx.Repo.GitRepo
ctx.Data["BaseName"] = headUser.Name
} else {
headGitRepo, err = git.OpenRepository(models.RepoPath(headUser.Name, headRepo.Name))
ctx.Data["BaseName"] = baseRepo.OwnerName
if err != nil {
ctx.ServerError("OpenRepository", err)
return nil, nil, nil, nil, "", ""