diff options
author | Unknwon <u@gogs.io> | 2017-03-16 23:10:45 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-03-16 23:10:45 -0400 |
commit | 171f97868dccb6d2c2a73b44b07593ccb8f348e6 (patch) | |
tree | 16a6a9ab501004d83237126956b60926a523bc42 /modules/context/repo.go | |
parent | becaec19a773301546045294d850d79614809c7c (diff) |
repo: allow issues and wiki for bare repository (#4104)
Diffstat (limited to 'modules/context/repo.go')
-rw-r--r-- | modules/context/repo.go | 19 |
1 files changed, 1 insertions, 18 deletions
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,16 +142,9 @@ 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 } |