Commit *object.Commit
Title string
LinesNum int
+ ImagesNum int
CommentsNum int
Topics []string
}
When string
Cfg *Cfg
Note string
+ Images []Img
Comments []string
Topics []string
Version string
When: commit.Author.When.Format(sgblog.WhenFmt),
Cfg: cfg,
Note: string(sgblog.GetNote(repo, notesTree, commit.Hash)),
+ Images: listImgs(cfg, commit.Hash),
Comments: sgblog.ParseComments(sgblog.GetNote(repo, commentsTree, commit.Hash)),
Topics: sgblog.ParseTopics(sgblog.GetNote(repo, topicsTree, commit.Hash)),
Version: sgblog.Version,
}
lines := msgSplit(commit.Message)
entries = append(entries, TableMenuEntry{
- Commit: commit,
- Title: lines[0],
- LinesNum: len(lines) - 2,
- CommentsNum: len(sgblog.ParseComments(sgblog.GetNote(repo, commentsTree, commit.Hash))),
- Topics: sgblog.ParseTopics(sgblog.GetNote(repo, topicsTree, commit.Hash)),
+ Commit: commit,
+ Title: lines[0],
+ LinesNum: len(lines) - 2,
+ ImagesNum: len(listImgs(cfg, commit.Hash)),
+ CommentsNum: len(sgblog.ParseComments(sgblog.GetNote(
+ repo, commentsTree, commit.Hash,
+ ))),
+ Topics: sgblog.ParseTopics(sgblog.GetNote(
+ repo, topicsTree, commit.Hash,
+ )),
})
}
offsetPrev := offset - PageEntries