diff options
author | 6543 <6543@obermui.de> | 2020-01-17 15:37:46 +0100 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2020-01-17 22:37:46 +0800 |
commit | 2f3a602b3cb71f5efbb2ad8c3a0f92581849debd (patch) | |
tree | b2e2f8e013093b4eb31872b60c1c745462c24453 | |
parent | 737ea6d83cc62a84eefee48c169766009424ecec (diff) | |
download | gitea-2f3a602b3cb71f5efbb2ad8c3a0f92581849debd.tar.gz gitea-2f3a602b3cb71f5efbb2ad8c3a0f92581849debd.zip |
fix (#9836)
-rw-r--r-- | routers/repo/compare.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/routers/repo/compare.go b/routers/repo/compare.go index 50c439f746..5d8f52b007 100644 --- a/routers/repo/compare.go +++ b/routers/repo/compare.go @@ -379,7 +379,8 @@ func CompareDiff(ctx *context.Context) { } defer headGitRepo.Close() - if err := parseBaseRepoInfo(ctx, headRepo); err != nil { + var err error + if err = parseBaseRepoInfo(ctx, headRepo); err != nil { ctx.ServerError("parseBaseRepoInfo", err) return } @@ -421,6 +422,11 @@ func CompareDiff(ctx *context.Context) { beforeCommitID := ctx.Data["BeforeCommitID"].(string) afterCommitID := ctx.Data["AfterCommitID"].(string) + if ctx.Data["Assignees"], err = ctx.Repo.Repository.GetAssignees(); err != nil { + ctx.ServerError("GetAssignees", err) + return + } + ctx.Data["Title"] = "Comparing " + base.ShortSha(beforeCommitID) + "..." + base.ShortSha(afterCommitID) ctx.Data["IsRepoToolbarCommits"] = true |