Browse Source

fix huge diff hangs

tags/v0.9.99
Unknwon 8 years ago
parent
commit
50264200f0
5 changed files with 6 additions and 4 deletions
  1. 1
    1
      README.md
  2. 1
    1
      cmd/web.go
  3. 1
    1
      gogs.go
  4. 2
    0
      models/git_diff.go
  5. 1
    1
      templates/.VERSION

+ 1
- 1
README.md View File

@@ -3,7 +3,7 @@ Gogs - Go Git Service [![Build Status](https://travis-ci.org/gogits/gogs.svg?bra

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

##### Current version: 0.8.3
##### Current version: 0.8.4

| Web | UI | Preview |
|:-------------:|:-------:|:-------:|

+ 1
- 1
cmd/web.go View File

@@ -88,7 +88,7 @@ func checkVersion() {
{"github.com/go-macaron/toolbox", toolbox.Version, "0.1.0"},
{"gopkg.in/ini.v1", ini.Version, "1.8.4"},
{"gopkg.in/macaron.v1", macaron.Version, "0.8.0"},
{"github.com/gogits/git-shell", git.Version, "0.2.0"},
{"github.com/gogits/git-shell", git.Version, "0.2.1"},
}
for _, c := range checkers {
if !version.Compare(c.Version(), c.Expected, ">=") {

+ 1
- 1
gogs.go View File

@@ -18,7 +18,7 @@ import (
"github.com/gogits/gogs/modules/setting"
)

const APP_VER = "0.8.3.1214"
const APP_VER = "0.8.4.1214"

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

+ 2
- 0
models/git_diff.go View File

@@ -9,6 +9,7 @@ import (
"bytes"
"fmt"
"io"
"io/ioutil"
"os"
"os/exec"
"strings"
@@ -124,6 +125,7 @@ func ParsePatch(maxlines int, reader io.Reader) (*Diff, error) {
// Diff data too large, we only show the first about maxlines lines
if lineCount >= maxlines {
log.Warn("Diff data too large")
io.Copy(ioutil.Discard, reader)
diff.Files = nil
return diff, nil
}

+ 1
- 1
templates/.VERSION View File

@@ -1 +1 @@
0.8.3.1214
0.8.4.1214

Loading…
Cancel
Save