diff options
author | Unknown <joe2010xtmf@163.com> | 2014-04-03 16:33:27 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-04-03 16:33:27 -0400 |
commit | e9c4156c874ceeecc81fdf7fe00ff2f582110ecd (patch) | |
tree | 091d17fbfa89444ab16c97d4c4b8da361a1c6ad8 /models/repo.go | |
parent | 79a610592ea7c2e93ab2f91190af1782c4aa8f8d (diff) | |
download | gitea-e9c4156c874ceeecc81fdf7fe00ff2f582110ecd.tar.gz gitea-e9c4156c874ceeecc81fdf7fe00ff2f582110ecd.zip |
Add: rename user
Diffstat (limited to 'models/repo.go')
-rw-r--r-- | models/repo.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/models/repo.go b/models/repo.go index 11e23ecd0f..56f2890977 100644 --- a/models/repo.go +++ b/models/repo.go @@ -372,9 +372,8 @@ func RepoPath(userName, repoName string) string { // ChangeRepositoryName changes all corresponding setting from old repository name to new one. func ChangeRepositoryName(userName, oldRepoName, newRepoName string) (err error) { // Update accesses. - accesses := make([]Access, 0, 5) - err = orm.Find(&accesses, &Access{RepoName: strings.ToLower(userName + "/" + oldRepoName)}) - if err != nil { + accesses := make([]Access, 0, 10) + if err = orm.Find(&accesses, &Access{RepoName: strings.ToLower(userName + "/" + oldRepoName)}); err != nil { return err } for i := range accesses { |