mirror of
https://github.com/go-gitea/gitea
synced 2025-07-05 18:17:19 +00:00
fix #711
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user