From f8a48ffaad481ee9eaa8a42e0e7d64c12c90ef86 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Wed, 24 Aug 2016 21:35:03 -0700 Subject: Web editor: improve code quality --- modules/context/repo.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/context') 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) { -- cgit v1.2.3