Skip to content

Commit 5026420

Browse files
committed
fix huge diff hangs
1 parent 7436ce6 commit 5026420

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Gogs - Go Git Service [![Build Status](https://travis-ci.org/gogits/gogs.svg?bra
33

44
![](https://github.com/gogits/gogs/blob/master/public/img/gogs-large-resize.png?raw=true)
55

6-
##### Current version: 0.8.3
6+
##### Current version: 0.8.4
77

88
| Web | UI | Preview |
99
|:-------------:|:-------:|:-------:|

cmd/web.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func checkVersion() {
8888
{"github.com/go-macaron/toolbox", toolbox.Version, "0.1.0"},
8989
{"gopkg.in/ini.v1", ini.Version, "1.8.4"},
9090
{"gopkg.in/macaron.v1", macaron.Version, "0.8.0"},
91-
{"github.com/gogits/git-shell", git.Version, "0.2.0"},
91+
{"github.com/gogits/git-shell", git.Version, "0.2.1"},
9292
}
9393
for _, c := range checkers {
9494
if !version.Compare(c.Version(), c.Expected, ">=") {

gogs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"github.com/gogits/gogs/modules/setting"
1919
)
2020

21-
const APP_VER = "0.8.3.1214"
21+
const APP_VER = "0.8.4.1214"
2222

2323
func init() {
2424
runtime.GOMAXPROCS(runtime.NumCPU())

models/git_diff.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"bytes"
1010
"fmt"
1111
"io"
12+
"io/ioutil"
1213
"os"
1314
"os/exec"
1415
"strings"
@@ -124,6 +125,7 @@ func ParsePatch(maxlines int, reader io.Reader) (*Diff, error) {
124125
// Diff data too large, we only show the first about maxlines lines
125126
if lineCount >= maxlines {
126127
log.Warn("Diff data too large")
128+
io.Copy(ioutil.Discard, reader)
127129
diff.Files = nil
128130
return diff, nil
129131
}

templates/.VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.8.3.1214
1+
0.8.4.1214

0 commit comments

Comments
 (0)