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 --- routers/repo/commit.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'routers/repo/commit.go') diff --git a/routers/repo/commit.go b/routers/repo/commit.go index 9cf339ec..dca7b1f9 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 -- cgit v1.2.3