From 5765212c6dbcaeb27779707af3ca57775e535bd9 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sun, 12 Jan 2020 17:36:21 +0800 Subject: Add owner_name column for table repository for maintaince reason (#9717) * Add owner_name column for table repository for maintaince reason * refactor * Fix tests * fix test * fix bug when fork repository Co-authored-by: zeripath --- routers/repo/compare.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'routers/repo') diff --git a/routers/repo/compare.go b/routers/repo/compare.go index d23bccd09a..bb800f9ef7 100644 --- a/routers/repo/compare.go +++ b/routers/repo/compare.go @@ -361,10 +361,8 @@ func parseBaseRepoInfo(ctx *context.Context, repo *models.Repository) error { if err := repo.GetBaseRepo(); err != nil { return err } - if err := repo.BaseRepo.GetOwnerName(); err != nil { - return err - } - baseGitRepo, err := git.OpenRepository(models.RepoPath(repo.BaseRepo.OwnerName, repo.BaseRepo.Name)) + + baseGitRepo, err := git.OpenRepository(repo.BaseRepo.RepoPath()) if err != nil { return err } -- cgit v1.2.3