diff options
Diffstat (limited to 'routers/repo/setting.go')
-rw-r--r-- | routers/repo/setting.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/routers/repo/setting.go b/routers/repo/setting.go index 3a0df713..a586bc02 100644 --- a/routers/repo/setting.go +++ b/routers/repo/setting.go @@ -370,6 +370,12 @@ func SettingsBranches(ctx *context.Context) { ctx.Data["Title"] = ctx.Tr("repo.settings.branches") ctx.Data["PageIsSettingsBranches"] = true + if ctx.Repo.Repository.IsBare { + ctx.Flash.Info(ctx.Tr("repo.settings.branches_bare"), true) + ctx.HTML(200, SETTINGS_BRANCHES) + return + } + protectBranches, err := models.GetProtectBranchesByRepoID(ctx.Repo.Repository.ID) if err != nil { ctx.Handle(500, "GetProtectBranchesByRepoID", err) |