1
0
Fork 0
forked from forgejo/forgejo

Commitless repos should be bare

This commit is contained in:
Ethan Koenig 2017-05-28 22:25:23 -04:00
parent e67ece26f0
commit c85ff532e9
2 changed files with 5 additions and 1 deletions

View file

@ -392,6 +392,10 @@ func RepoRef() macaron.Handler {
if err != nil {
ctx.Handle(500, "GetBranches", err)
return
} else if len(brs) == 0 {
err = fmt.Errorf("No branches in non-bare repository %s",
ctx.Repo.GitRepo.Path)
ctx.Handle(500, "GetBranches", err)
}
refName = brs[0]
}