aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-01-09 13:39:18 +0800
committerUnknwon <u@gogs.io>2016-01-09 13:39:18 +0800
commitbcf6aed45237250f678e7051a5ee0bc7c6e2f3c3 (patch)
tree76fec917b2379b8455d67b92b16fa8d3424d082d /routers
parent4331d1d2a00896b6bc5452abd93066110156d414 (diff)
parent697b0e2aba454325d5b70736823440e1db2c40ba (diff)
downloadgitea-bcf6aed45237250f678e7051a5ee0bc7c6e2f3c3.tar.gz
gitea-bcf6aed45237250f678e7051a5ee0bc7c6e2f3c3.zip
Merge pull request #2335 from andreynering/highlight-diff
Highlight diff
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/commit.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/routers/repo/commit.go b/routers/repo/commit.go
index c3fc4d177a..9e46c2e846 100644
--- a/routers/repo/commit.go
+++ b/routers/repo/commit.go
@@ -168,6 +168,12 @@ func Diff(ctx *middleware.Context) {
}
}
+ for _, diffFile := range diff.Files {
+ for _, diffSection := range diffFile.Sections {
+ diffSection.ComputeLinesDiff()
+ }
+ }
+
ctx.Data["IsSplitStyle"] = ctx.Query("style") == "split"
ctx.Data["Username"] = userName
ctx.Data["Reponame"] = repoName