diff options
author | Unknown <joe2010xtmf@163.com> | 2014-04-16 07:13:20 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-04-16 07:13:20 -0400 |
commit | 1bfe4ee665f6b6ab8891682bc2bfe7d7c92c039b (patch) | |
tree | 64d7fdbecd86498831b86a10657c438bf6047a6b /routers | |
parent | 2dc0329c5f82c547d69e76082fce201729b77c0b (diff) | |
parent | 9e047cdbbba55714023f626647121ff0597037be (diff) | |
download | gitea-1bfe4ee665f6b6ab8891682bc2bfe7d7c92c039b.tar.gz gitea-1bfe4ee665f6b6ab8891682bc2bfe7d7c92c039b.zip |
Merge branch 'master' of github.com:gogits/gogs
Diffstat (limited to 'routers')
-rw-r--r-- | routers/repo/http.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/repo/http.go b/routers/repo/http.go index 0a211c6f3f..b58d19489b 100644 --- a/routers/repo/http.go +++ b/routers/repo/http.go @@ -125,10 +125,10 @@ func Http(ctx *middleware.Context, params martini.Params) { config := Config{base.RepoRootPath, "git", true, true, func(rpc string, input []byte) { if rpc == "receive-pack" { - firstLine := bytes.IndexRune(input, '\n') + firstLine := bytes.IndexRune(input, '\000') if firstLine > -1 { fields := strings.Fields(string(input[:firstLine])) - if len(fields) > 3 { + if len(fields) == 3 { oldCommitId := fields[0][4:] newCommitId := fields[1] refName := fields[2] |