diff options
author | Andrey Nering <andrey.nering@gmail.com> | 2016-01-03 19:26:46 -0200 |
---|---|---|
committer | Andrey Nering <andrey.nering@gmail.com> | 2016-01-06 17:46:56 -0200 |
commit | 73474c043bfdeeb33cd58bdfe42592fea3083422 (patch) | |
tree | 0aab45170a12b50e2f10c2125cb11ae18c879f87 /routers/repo/commit.go | |
parent | 0cb739684096396e26595ac70817a2a05b61b443 (diff) | |
download | gitea-73474c043bfdeeb33cd58bdfe42592fea3083422.tar.gz gitea-73474c043bfdeeb33cd58bdfe42592fea3083422.zip |
Highlighting differences of lines in the diff view.
Diffstat (limited to 'routers/repo/commit.go')
-rw-r--r-- | routers/repo/commit.go | 6 |
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 |