summaryrefslogtreecommitdiffstats
path: root/routers/repo/commit.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-08-24 21:35:03 -0700
committerUnknwon <u@gogs.io>2016-08-24 21:35:03 -0700
commitf8a48ffaad481ee9eaa8a42e0e7d64c12c90ef86 (patch)
tree21ee3e7965c77c16fcdaa209f01cebae6a809625 /routers/repo/commit.go
parent67fb0fe6a5783f772abfb5438a154435dafff4de (diff)
downloadgitea-f8a48ffaad481ee9eaa8a42e0e7d64c12c90ef86.tar.gz
gitea-f8a48ffaad481ee9eaa8a42e0e7d64c12c90ef86.zip
Web editor: improve code quality
Diffstat (limited to 'routers/repo/commit.go')
-rw-r--r--routers/repo/commit.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/repo/commit.go b/routers/repo/commit.go
index 9cf339ecea..dca7b1f9f8 100644
--- a/routers/repo/commit.go
+++ b/routers/repo/commit.go
@@ -25,9 +25,9 @@ const (
func RefCommits(ctx *context.Context) {
switch {
- case len(ctx.Repo.TreeName) == 0:
+ case len(ctx.Repo.TreePath) == 0:
Commits(ctx)
- case ctx.Repo.TreeName == "search":
+ case ctx.Repo.TreePath == "search":
SearchCommits(ctx)
default:
FileHistory(ctx)
@@ -104,7 +104,7 @@ func SearchCommits(ctx *context.Context) {
func FileHistory(ctx *context.Context) {
ctx.Data["IsRepoToolbarCommits"] = true
- fileName := ctx.Repo.TreeName
+ fileName := ctx.Repo.TreePath
if len(fileName) == 0 {
Commits(ctx)
return