fix #1948
This commit is contained in:
parent
84a43b38cf
commit
b4970b3cc3
5 changed files with 9 additions and 26 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue