diff options
author | Unknwon <u@gogs.io> | 2017-04-05 09:05:40 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-04-05 09:05:40 -0400 |
commit | 6fbb984ebf4f0d6804f0f83e6edb12ef0bb9a570 (patch) | |
tree | 81f08210cb3553370795ec11c731d37bb3590122 /routers/repo/commit.go | |
parent | ba151eda0a8b6eec2cb45f01fcbc8aef7ad5a06f (diff) |
Refactoring: rename pkg/base -> pkg/tool
Diffstat (limited to 'routers/repo/commit.go')
-rw-r--r-- | routers/repo/commit.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/routers/repo/commit.go b/routers/repo/commit.go index 2b5fc86f..e51e81c8 100644 --- a/routers/repo/commit.go +++ b/routers/repo/commit.go @@ -11,14 +11,14 @@ import ( "github.com/gogits/git-module" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/tool" "github.com/gogits/gogs/pkg/context" "github.com/gogits/gogs/pkg/setting" ) const ( - COMMITS base.TplName = "repo/commits" - DIFF base.TplName = "repo/diff/page" + COMMITS tool.TplName = "repo/commits" + DIFF tool.TplName = "repo/diff/page" ) func RefCommits(ctx *context.Context) { @@ -165,7 +165,7 @@ func Diff(ctx *context.Context) { ctx.Data["Username"] = userName ctx.Data["Reponame"] = repoName ctx.Data["IsImageFile"] = commit.IsImageFile - ctx.Data["Title"] = commit.Summary() + " · " + base.ShortSha(commitID) + ctx.Data["Title"] = commit.Summary() + " · " + tool.ShortSha(commitID) ctx.Data["Commit"] = commit ctx.Data["Author"] = models.ValidateCommitWithEmail(commit) ctx.Data["Diff"] = diff @@ -228,7 +228,7 @@ func CompareDiff(ctx *context.Context) { ctx.Data["Username"] = userName ctx.Data["Reponame"] = repoName ctx.Data["IsImageFile"] = commit.IsImageFile - ctx.Data["Title"] = "Comparing " + base.ShortSha(beforeCommitID) + "..." + base.ShortSha(afterCommitID) + " · " + userName + "/" + repoName + ctx.Data["Title"] = "Comparing " + tool.ShortSha(beforeCommitID) + "..." + tool.ShortSha(afterCommitID) + " · " + userName + "/" + repoName ctx.Data["Commit"] = commit ctx.Data["Diff"] = diff ctx.Data["DiffNotAvailable"] = diff.NumFiles() == 0 |