|
|
@ -414,8 +414,8 @@ func RepoAssignment() macaron.Handler {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// repo is empty and display enable
|
|
|
|
// Disable everything when the repo is being created
|
|
|
|
if ctx.Repo.Repository.IsEmpty || ctx.Repo.Repository.IsBeingCreated() {
|
|
|
|
if ctx.Repo.Repository.IsBeingCreated() {
|
|
|
|
ctx.Data["BranchName"] = ctx.Repo.Repository.DefaultBranch
|
|
|
|
ctx.Data["BranchName"] = ctx.Repo.Repository.DefaultBranch
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -427,6 +427,12 @@ func RepoAssignment() macaron.Handler {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ctx.Repo.GitRepo = gitRepo
|
|
|
|
ctx.Repo.GitRepo = gitRepo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Stop at this point when the repo is empty.
|
|
|
|
|
|
|
|
if ctx.Repo.Repository.IsEmpty {
|
|
|
|
|
|
|
|
ctx.Data["BranchName"] = ctx.Repo.Repository.DefaultBranch
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
tags, err := ctx.Repo.GitRepo.GetTags()
|
|
|
|
tags, err := ctx.Repo.GitRepo.GetTags()
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
ctx.ServerError("GetTags", err)
|
|
|
|
ctx.ServerError("GetTags", err)
|
|
|
|