mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-05-30 14:28:19 +08:00
fix #1948
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user