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/user.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/user.go')
-rw-r--r-- | models/user.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/models/user.go b/models/user.go index 2806ef64ed..8993d7de3c 100644 --- a/models/user.go +++ b/models/user.go @@ -133,6 +133,9 @@ func (u *User) RepoCreationNum() int { func (u *User) CanCreateRepo() bool { if u.MaxRepoCreation <= -1 { + if setting.Repository.MaxCreationLimit == -1 { + return true + } return u.NumRepos < setting.Repository.MaxCreationLimit } return u.NumRepos < u.MaxRepoCreation |