diff options
author | Unknwon <joe2010xtmf@163.com> | 2014-12-16 02:28:57 -0500 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2014-12-16 02:28:57 -0500 |
commit | 1a5aa5e0c09fd8ad98f7c2dd33a594707cf1dc59 (patch) | |
tree | 7f9b098e7556e2a92f38b23a58dfefa71df59b64 /routers | |
parent | 9803c421f56771805a9d63280a0c830f6db3b13b (diff) | |
download | gitea-1a5aa5e0c09fd8ad98f7c2dd33a594707cf1dc59.tar.gz gitea-1a5aa5e0c09fd8ad98f7c2dd33a594707cf1dc59.zip |
fix #741
Diffstat (limited to 'routers')
-rw-r--r-- | routers/repo/view.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/routers/repo/view.go b/routers/repo/view.go index 2fb411589a..3722f04b44 100644 --- a/routers/repo/view.go +++ b/routers/repo/view.go @@ -154,8 +154,12 @@ func Home(ctx *middleware.Context) { // Render issue index links. for _, f := range files { - c := f[1].(*git.Commit) - c.CommitMessage = string(base.RenderIssueIndexPattern([]byte(c.CommitMessage), ctx.Repo.RepoLink)) + switch c := f[1].(type) { + case *git.Commit: + c.CommitMessage = string(base.RenderIssueIndexPattern([]byte(c.CommitMessage), ctx.Repo.RepoLink)) + case *git.SubModuleFile: + c.CommitMessage = string(base.RenderIssueIndexPattern([]byte(c.CommitMessage), ctx.Repo.RepoLink)) + } } ctx.Data["Files"] = files |