0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-24 16:16:35 -05:00

Compute inline diff for pull request view, too. Fix #2462

This commit is contained in:
Andrey Nering 2016-01-25 20:56:27 -02:00
parent 1372cab35a
commit ee5d6fb025

View file

@ -349,6 +349,12 @@ func ViewPullFiles(ctx *middleware.Context) {
ctx.Data["Diff"] = diff ctx.Data["Diff"] = diff
ctx.Data["DiffNotAvailable"] = diff.NumFiles() == 0 ctx.Data["DiffNotAvailable"] = diff.NumFiles() == 0
for _, diffFile := range diff.Files {
for _, diffSection := range diffFile.Sections {
diffSection.ComputeLinesDiff()
}
}
commit, err := gitRepo.GetCommit(endCommitID) commit, err := gitRepo.GetCommit(endCommitID)
if err != nil { if err != nil {
ctx.Handle(500, "GetCommit", err) ctx.Handle(500, "GetCommit", err)