Commit: commit,
When: commit.Author.When.Format(sgblog.WhenFmt),
Cfg: cfg,
- Note: string(getNote(notesTree, commit.Hash)),
- Comments: parseComments(getNote(commentsTree, commit.Hash)),
- Topics: parseTopics(getNote(topicsTree, commit.Hash)),
+ Note: string(sgblog.GetNote(repo, notesTree, commit.Hash)),
+ Comments: sgblog.ParseComments(sgblog.GetNote(repo, commentsTree, commit.Hash)),
+ Topics: sgblog.ParseTopics(sgblog.GetNote(repo, topicsTree, commit.Hash)),
Version: sgblog.Version,
TitleEscaped: url.PathEscape(fmt.Sprintf(
"Re: %s (%s)", msgSplit(commit.Message)[0], commit.Hash,
Commit: commit,
Title: lines[0],
LinesNum: len(lines) - 2,
- CommentsNum: len(parseComments(getNote(commentsTree, commit.Hash))),
- Topics: parseTopics(getNote(topicsTree, commit.Hash)),
+ CommentsNum: len(sgblog.ParseComments(sgblog.GetNote(repo, commentsTree, commit.Hash))),
+ Topics: sgblog.ParseTopics(sgblog.GetNote(repo, topicsTree, commit.Hash)),
})
}
tmpl := template.Must(template.New("menu").Parse(TmplGopherMenu))