diff options
author | Unknwon <u@gogs.io> | 2016-08-24 21:35:03 -0700 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-08-24 21:35:03 -0700 |
commit | f8a48ffaad481ee9eaa8a42e0e7d64c12c90ef86 (patch) | |
tree | 21ee3e7965c77c16fcdaa209f01cebae6a809625 /modules/context | |
parent | 67fb0fe6a5783f772abfb5438a154435dafff4de (diff) | |
download | gitea-f8a48ffaad481ee9eaa8a42e0e7d64c12c90ef86.tar.gz gitea-f8a48ffaad481ee9eaa8a42e0e7d64c12c90ef86.zip |
Web editor: improve code quality
Diffstat (limited to 'modules/context')
-rw-r--r-- | modules/context/repo.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/context/repo.go b/modules/context/repo.go index 2f6a5de7a1..f5f26b1e51 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -41,14 +41,14 @@ type Repository struct { GitRepo *git.Repository BranchName string TagName string - TreeName string + TreePath string CommitID string RepoLink string CloneLink models.CloneLink CommitsCount int64 Mirror *models.Mirror - PullRequest *PullRequest + PullRequest *PullRequest } // IsOwner returns true if current user is the owner of repository. @@ -384,7 +384,7 @@ func RepoRef() macaron.Handler { if ctx.Repo.GitRepo.IsBranchExist(refName) || ctx.Repo.GitRepo.IsTagExist(refName) { if i < len(parts)-1 { - ctx.Repo.TreeName = strings.Join(parts[i+1:], "/") + ctx.Repo.TreePath = strings.Join(parts[i+1:], "/") } hasMatched = true break @@ -392,7 +392,7 @@ func RepoRef() macaron.Handler { } if !hasMatched && len(parts[0]) == 40 { refName = parts[0] - ctx.Repo.TreeName = strings.Join(parts[1:], "/") + ctx.Repo.TreePath = strings.Join(parts[1:], "/") } if ctx.Repo.GitRepo.IsBranchExist(refName) { |