Browse Source

Merge pull request #2480 from andreynering/fix-2462

Compute inline diff for pull request view, too. Fix #2462
tags/v1.2.0-rc1
Unknwon 9 years ago
parent
commit
7e6db25e6b
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      routers/repo/pull.go

+ 6
- 0
routers/repo/pull.go 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)


Loading…
Cancel
Save