0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-24 16:16:35 -05:00
forgejo/models/repo_branch.go
Lunny Xiao 2677d071f9
Move newbranch to standalone package (#9627)
* Move newbranch to standalone package

* move branch functions to modules to avoid dependencies cycles

* fix tests

* fix lint

* fix lint
2020-01-14 11:38:04 +08:00

11 lines
406 B
Go

// Copyright 2016 The Gogs Authors. All rights reserved.
// Copyright 2019 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package models
// CanCreateBranch returns true if repository meets the requirements for creating new branches.
func (repo *Repository) CanCreateBranch() bool {
return !repo.IsMirror
}