From 95cb921097b8d1bb8fef0ef4ac402beb4a872f4a Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Sat, 18 Jan 2020 05:31:46 +0100 Subject: [PATCH] fix (#9837) --- routers/repo/compare.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/routers/repo/compare.go b/routers/repo/compare.go index 9e76fe5b5e..54bae464b2 100644 --- a/routers/repo/compare.go +++ b/routers/repo/compare.go @@ -381,7 +381,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 } @@ -423,6 +424,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