This commit is contained in:
Unknwon 2015-11-15 14:05:51 -05:00
parent 84a43b38cf
commit b4970b3cc3
5 changed files with 9 additions and 26 deletions

View file

@ -79,6 +79,12 @@ 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 {
ctx.Data["CommitsCount"] = 0
return
}
var (
refName string
err error