mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-09-15 18:56:59 +00:00
Need a field to specify if repository is bare
This commit is contained in:
parent
cd070b56d2
commit
e3f55ca0fb
3 changed files with 7 additions and 10 deletions
|
@ -69,7 +69,7 @@ func Single(ctx *middleware.Context, params martini.Params) {
|
|||
log.Error("repo.Single(GetBranches): %v", err)
|
||||
ctx.Error(404)
|
||||
return
|
||||
} else if len(brs) == 0 {
|
||||
} else if ctx.Repo.Repository.IsBare {
|
||||
ctx.Data["IsBareRepo"] = true
|
||||
ctx.HTML(200, "repo/single")
|
||||
return
|
||||
|
@ -224,13 +224,7 @@ func Setting(ctx *middleware.Context, params martini.Params) {
|
|||
|
||||
ctx.Data["IsRepoToolbarSetting"] = true
|
||||
|
||||
// Branches.
|
||||
brs, err := models.GetBranches(params["username"], params["reponame"])
|
||||
if err != nil {
|
||||
log.Error("repo.Setting(GetBranches): %v", err)
|
||||
ctx.Error(404)
|
||||
return
|
||||
} else if len(brs) == 0 {
|
||||
if ctx.Repo.Repository.IsBare {
|
||||
ctx.Data["IsBareRepo"] = true
|
||||
ctx.HTML(200, "repo/setting")
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue