1
0
Fork 0
forked from forgejo/forgejo

Refactoring of inline diff computing to prevent empty diff box. Fix #2489

This commit is contained in:
Andrey Nering 2016-01-27 18:54:08 -02:00
parent 93f40995b3
commit 5deb726f3f
4 changed files with 37 additions and 50 deletions

View file

@ -349,12 +349,6 @@ 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)