Merge pull request #1829 from ethantkoenig/no_branches

Commitless repos should be bare
This commit is contained in:
Andrey Nering authored and GitHub committed 2017-06-12 11:05:01 -03:00
commit 635273cea6
2 files changed
+5 -1

No files matched your search

+4
View File
@@ -390,6 +390,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]
}