diff options
author | Andrey Nering <andrey.nering@gmail.com> | 2016-01-25 20:56:27 -0200 |
---|---|---|
committer | Andrey Nering <andrey.nering@gmail.com> | 2016-01-25 20:56:27 -0200 |
commit | ee5d6fb025e926665aaf082ee309b77350698641 (patch) | |
tree | f602dcedb747fd06a3675127c0be7c1632377203 | |
parent | 1372cab35a22f36162e8cb0d1eaf1e1212244711 (diff) | |
download | gitea-ee5d6fb025e926665aaf082ee309b77350698641.tar.gz gitea-ee5d6fb025e926665aaf082ee309b77350698641.zip |
Compute inline diff for pull request view, too. Fix #2462
-rw-r--r-- | routers/repo/pull.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/routers/repo/pull.go b/routers/repo/pull.go index e3500716d3..770ec471e4 100644 --- a/routers/repo/pull.go +++ b/routers/repo/pull.go @@ -349,6 +349,12 @@ func ViewPullFiles(ctx *middleware.Context) { ctx.Data["Diff"] = diff ctx.Data["DiffNotAvailable"] = diff.NumFiles() == 0 + for _, diffFile := range diff.Files { + for _, diffSection := range diffFile.Sections { + diffSection.ComputeLinesDiff() + } + } + commit, err := gitRepo.GetCommit(endCommitID) if err != nil { ctx.Handle(500, "GetCommit", err) |