diff options
Diffstat (limited to 'modules/middleware/repo.go')
-rw-r--r-- | modules/middleware/repo.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go index 1418486430..c7481743d4 100644 --- a/modules/middleware/repo.go +++ b/modules/middleware/repo.go @@ -79,6 +79,11 @@ func ApiRepoAssignment() macaron.Handler { // RepoRef handles repository reference name including those contain `/`. func RepoRef() macaron.Handler { return func(ctx *Context) { + // Empty repository does not have reference information. + if ctx.Repo.Repository.IsBare { + return + } + var ( refName string err error |