From 171f97868dccb6d2c2a73b44b07593ccb8f348e6 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Thu, 16 Mar 2017 23:10:45 -0400 Subject: repo: allow issues and wiki for bare repository (#4104) --- modules/context/repo.go | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'modules/context') diff --git a/modules/context/repo.go b/modules/context/repo.go index 209ea1e3..4a3ccf97 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -11,7 +11,6 @@ import ( "strings" "github.com/Unknwon/com" - log "gopkg.in/clog.v1" "gopkg.in/editorconfig/editorconfig-core-go.v1" "gopkg.in/macaron.v1" @@ -143,15 +142,8 @@ func earlyResponseForGoGetMeta(ctx *Context) { }))) } -func RepoAssignment(args ...bool) macaron.Handler { +func RepoAssignment() macaron.Handler { return func(ctx *Context) { - var ( - displayBare bool // To display bare page if it is a bare repo. - ) - if len(args) >= 1 { - displayBare = args[0] - } - var ( owner *models.User err error @@ -282,15 +274,6 @@ func RepoAssignment(args ...bool) macaron.Handler { // repo is bare and display enable if ctx.Repo.Repository.IsBare { - log.Trace("Bare repository: %s", ctx.Repo.RepoLink) - // NOTE: to prevent templating error - ctx.Data["BranchName"] = "" - if displayBare { - if !ctx.Repo.IsAdmin() { - ctx.Flash.Info(ctx.Tr("repo.repo_is_empty"), true) - } - ctx.HTML(200, "repo/bare") - } return } -- cgit v1.2.3