diff options
author | Unknwon <joe2010xtmf@163.com> | 2014-12-09 02:18:25 -0500 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2014-12-09 02:18:25 -0500 |
commit | 9a1fe801e526ae1bc0a211d8a218aabcf985376d (patch) | |
tree | e40f92f1b34f81c60ffef084761b7d6cd4336aa2 /routers/repo/commit.go | |
parent | 6f71632e3ef6c0c818b3224e501fa66583108806 (diff) | |
download | gitea-9a1fe801e526ae1bc0a211d8a218aabcf985376d.tar.gz gitea-9a1fe801e526ae1bc0a211d8a218aabcf985376d.zip |
fix #711
Diffstat (limited to 'routers/repo/commit.go')
-rw-r--r-- | routers/repo/commit.go | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/routers/repo/commit.go b/routers/repo/commit.go index 82be6881fa..619c6c815c 100644 --- a/routers/repo/commit.go +++ b/routers/repo/commit.go @@ -33,6 +33,16 @@ func RefCommits(ctx *middleware.Context) { } } +func RenderIssueLinks(oldCommits *list.List, repoLink string) *list.List { + newCommits := list.New() + for e := oldCommits.Front(); e != nil; e = e.Next() { + c := e.Value.(*git.Commit) + c.CommitMessage = string(base.RenderIssueIndexPattern([]byte(c.CommitMessage), repoLink)) + newCommits.PushBack(c) + } + return newCommits +} + func Commits(ctx *middleware.Context) { ctx.Data["IsRepoToolbarCommits"] = true @@ -86,16 +96,6 @@ func Commits(ctx *middleware.Context) { ctx.HTML(200, COMMITS) } -func RenderIssueLinks(oldCommits *list.List, repoLink string) *list.List { - newCommits := list.New() - for e := oldCommits.Front(); e != nil; e = e.Next() { - c := e.Value.(*git.Commit) - c.CommitMessage = string(base.RenderissueIndexPattern([]byte(c.CommitMessage), repoLink)) - newCommits.PushBack(c) - } - return newCommits -} - func SearchCommits(ctx *middleware.Context) { ctx.Data["IsSearchPage"] = true ctx.Data["IsRepoToolbarCommits"] = true @@ -206,7 +206,7 @@ func Diff(ctx *middleware.Context) { commitId := ctx.Repo.CommitId commit := ctx.Repo.Commit - commit.CommitMessage = string(base.RenderissueIndexPattern([]byte(commit.CommitMessage), ctx.Repo.RepoLink)) + commit.CommitMessage = string(base.RenderIssueIndexPattern([]byte(commit.CommitMessage), ctx.Repo.RepoLink)) diff, err := models.GetDiffCommit(models.RepoPath(userName, repoName), commitId, setting.MaxGitDiffLines) if err != nil { |