summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-12-16 02:28:57 -0500
committerUnknwon <joe2010xtmf@163.com>2014-12-16 02:28:57 -0500
commit1a5aa5e0c09fd8ad98f7c2dd33a594707cf1dc59 (patch)
tree7f9b098e7556e2a92f38b23a58dfefa71df59b64 /routers
parent9803c421f56771805a9d63280a0c830f6db3b13b (diff)
downloadgitea-1a5aa5e0c09fd8ad98f7c2dd33a594707cf1dc59.tar.gz
gitea-1a5aa5e0c09fd8ad98f7c2dd33a594707cf1dc59.zip
fix #741
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/view.go8
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