diff options
Diffstat (limited to 'routers/repo/commit.go')
-rw-r--r-- | routers/repo/commit.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/routers/repo/commit.go b/routers/repo/commit.go index 1835e47318..95630fcece 100644 --- a/routers/repo/commit.go +++ b/routers/repo/commit.go @@ -13,7 +13,9 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" + "github.com/Unknwon/paginater" ) @@ -208,6 +210,14 @@ func Diff(ctx *context.Context) { if len(commitID) != 40 { commitID = commit.ID.String() } + + statuses, err := models.GetLatestCommitStatus(ctx.Repo.Repository, ctx.Repo.Commit.ID.String(), 0) + if err != nil { + log.Error(3, "GetLatestCommitStatus: %v", err) + } + + ctx.Data["CommitStatus"] = models.CalcCommitStatus(statuses) + diff, err := models.GetDiffCommit(models.RepoPath(userName, repoName), commitID, setting.Git.MaxGitDiffLines, setting.Git.MaxGitDiffLineCharacters, setting.Git.MaxGitDiffFiles) |