diff options
Diffstat (limited to 'modules/context/api.go')
-rw-r--r-- | modules/context/api.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/context/api.go b/modules/context/api.go index 89b0bb749a..7e43d1f6bc 100644 --- a/modules/context/api.go +++ b/modules/context/api.go @@ -125,10 +125,10 @@ func APIContexter() macaron.Handler { } // ReferencesGitRepo injects the GitRepo into the Context -func ReferencesGitRepo() macaron.Handler { +func ReferencesGitRepo(allowEmpty bool) macaron.Handler { return func(ctx *APIContext) { // Empty repository does not have reference information. - if ctx.Repo.Repository.IsEmpty { + if !allowEmpty && ctx.Repo.Repository.IsEmpty { return } |