diff options
author | Unknwon <u@gogs.io> | 2015-12-10 16:27:47 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-12-10 16:27:47 -0500 |
commit | 99e9bbef6c291e983ec919406ed50a91b929c34c (patch) | |
tree | e058ffae83c704edd6ff881ad78d791eb58ecbb0 /models/update.go | |
parent | 0e96a46020564af8a0061ccea09893422a48cc26 (diff) | |
download | gitea-99e9bbef6c291e983ec919406ed50a91b929c34c.tar.gz gitea-99e9bbef6c291e983ec919406ed50a91b929c34c.zip |
fix bool check for repo max limit and fix hang when push repo with tons of commits
Diffstat (limited to 'models/update.go')
-rw-r--r-- | models/update.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/models/update.go b/models/update.go index 9878f04a07..0c4d342d01 100644 --- a/models/update.go +++ b/models/update.go @@ -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) } |