summaryrefslogtreecommitdiffstats
path: root/modules/context
diff options
context:
space:
mode:
Diffstat (limited to 'modules/context')
-rw-r--r--modules/context/api.go2
-rw-r--r--modules/context/repo.go10
2 files changed, 6 insertions, 6 deletions
diff --git a/modules/context/api.go b/modules/context/api.go
index 6a9c792370..b27ffcbc8c 100644
--- a/modules/context/api.go
+++ b/modules/context/api.go
@@ -124,7 +124,7 @@ func APIContexter() macaron.Handler {
func ReferencesGitRepo() macaron.Handler {
return func(ctx *APIContext) {
// Empty repository does not have reference information.
- if ctx.Repo.Repository.IsBare {
+ if ctx.Repo.Repository.IsEmpty {
return
}
diff --git a/modules/context/repo.go b/modules/context/repo.go
index 55d607a28a..c10abdcb7b 100644
--- a/modules/context/repo.go
+++ b/modules/context/repo.go
@@ -234,7 +234,7 @@ func repoAssignment(ctx *Context, repo *models.Repository) {
ctx.Repo.Repository = repo
ctx.Data["RepoName"] = ctx.Repo.Repository.Name
- ctx.Data["IsBareRepo"] = ctx.Repo.Repository.IsBare
+ ctx.Data["IsEmptyRepo"] = ctx.Repo.Repository.IsEmpty
}
// RepoIDAssignment returns a macaron handler which assigns the repo to the context.
@@ -370,8 +370,8 @@ func RepoAssignment() macaron.Handler {
ctx.Data["IsStaringRepo"] = models.IsStaring(ctx.User.ID, repo.ID)
}
- // repo is bare and display enable
- if ctx.Repo.Repository.IsBare {
+ // repo is empty and display enable
+ if ctx.Repo.Repository.IsEmpty {
ctx.Data["BranchName"] = ctx.Repo.Repository.DefaultBranch
return
}
@@ -520,7 +520,7 @@ func getRefName(ctx *Context, pathType RepoRefType) string {
func RepoRefByType(refType RepoRefType) macaron.Handler {
return func(ctx *Context) {
// Empty repository does not have reference information.
- if ctx.Repo.Repository.IsBare {
+ if ctx.Repo.Repository.IsEmpty {
return
}
@@ -549,7 +549,7 @@ func RepoRefByType(refType RepoRefType) macaron.Handler {
ctx.ServerError("GetBranches", err)
return
} else if len(brs) == 0 {
- err = fmt.Errorf("No branches in non-bare repository %s",
+ err = fmt.Errorf("No branches in non-empty repository %s",
ctx.Repo.GitRepo.Path)
ctx.ServerError("GetBranches", err)
return