1
0
Fork 0
forked from forgejo/forgejo

Refactor repo.isBare to repo.isEmpty #5629 (#5714)

* Refactor repo.isBare to repo.isEmpty #5629

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Remove Sync call
This commit is contained in:
zeripath 2019-01-18 00:01:04 +00:00 committed by techknowlogick
parent 9edc829c17
commit 07802a2bc5
39 changed files with 125 additions and 81 deletions

View file

@ -28,10 +28,10 @@ const (
tplMigrate base.TplName = "repo/migrate"
)
// MustBeNotBare render when a repo is a bare git dir
func MustBeNotBare(ctx *context.Context) {
if ctx.Repo.Repository.IsBare {
ctx.NotFound("MustBeNotBare", nil)
// MustBeNotEmpty render when a repo is a empty git dir
func MustBeNotEmpty(ctx *context.Context) {
if ctx.Repo.Repository.IsEmpty {
ctx.NotFound("MustBeNotEmpty", nil)
}
}