1
0
Fork 0
forked from forgejo/forgejo

fix bool check for repo max limit and fix hang when push repo with tons of commits

This commit is contained in:
Unknwon 2015-12-10 16:27:47 -05:00
parent 0e96a46020
commit 99e9bbef6c
6 changed files with 8 additions and 9 deletions

View file

@ -10,7 +10,7 @@ import (
"os/exec"
"strings"
"github.com/gogits/git-shell"
git "github.com/gogits/git-shell"
"github.com/gogits/gogs/modules/log"
)
@ -135,7 +135,7 @@ func Update(refName, oldCommitID, newCommitID, userName, repoUserName, repoName
// Push new branch.
var l *list.List
if isNew {
l, err = newCommit.CommitsBefore()
l, err = newCommit.CommitsBeforeLimit(10)
if err != nil {
return fmt.Errorf("CommitsBefore: %v", err)
}