1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

models/action.go: mirror fix on #892

- modules/base/markdown.go: fix issue link issue
- routers/repo/view.go: remove useless code
This commit is contained in:
Unknwon
2015-02-06 20:34:49 -05:00
parent 0669897226
commit afccd0a3ee
3 changed files with 14 additions and 24 deletions

View File

@@ -127,7 +127,6 @@ func Home(ctx *middleware.Context) {
entries.Sort()
files := make([][]interface{}, 0, len(entries))
for _, te := range entries {
if te.Type != git.COMMIT {
c, err := ctx.Repo.Commit.GetCommitOfRelPath(filepath.Join(treePath, te.Name()))
@@ -151,16 +150,6 @@ func Home(ctx *middleware.Context) {
files = append(files, []interface{}{te, git.NewSubModuleFile(c, sm.Url, te.Id.String())})
}
}
// Render issue index links.
for _, f := range files {
switch c := f[1].(type) {
case *git.Commit:
c.CommitMessage = c.CommitMessage
case *git.SubModuleFile:
c.CommitMessage = c.CommitMessage
}
}
ctx.Data["Files"] = files
var readmeFile *git.Blob
@@ -208,7 +197,6 @@ func Home(ctx *middleware.Context) {
}
lastCommit := ctx.Repo.Commit
lastCommit.CommitMessage = string(base.RenderIssueIndexPattern([]byte(lastCommit.CommitMessage), ctx.Repo.RepoLink))
if len(treePath) > 0 {
c, err := ctx.Repo.Commit.GetCommitOfRelPath(treePath)
if err != nil {