Commit 6d8b897

Eric Bower  ·  2023-08-10 09:24:09 -0400 EDT
parent 5b50e23
cleanup
1 files changed,  +14, -10
+14, -10
......@@ -73,7 +73,7 @@ type RevData struct {
7373
7474 type TagData struct {
7575 Name string
76- URL template.URL
76+ URL template.URL
7777 }
7878
7979 type CommitData struct {
......@@ -82,7 +82,7 @@ type CommitData struct {
8282 WhenStr string
8383 AuthorStr string
8484 ShortID string
85- Refs []*RefInfo
85+ Refs []*RefInfo
8686 *git.Commit
8787 }
8888
......@@ -117,7 +117,7 @@ type DiffRenderFile struct {
117117 }
118118
119119 type RefInfo struct {
120- ID string
120+ ID string
121121 Refspec string
122122 URL template.URL
123123 }
......@@ -577,7 +577,7 @@ func (c *Config) writeRepo() *BranchOutput {
577577 claimed := false
578578 for _, revData := range revs {
579579 refInfoMap[revData.RevName] = &RefInfo{
580- ID: revData.ID,
580+ ID: revData.ID,
581581 Refspec: revData.RevName,
582582 URL: revData.TreeURL,
583583 }
......@@ -592,7 +592,7 @@ func (c *Config) writeRepo() *BranchOutput {
592592 }
593593
594594 refInfoMap[refspec] = &RefInfo{
595- ID: ref.ID,
595+ ID: ref.ID,
596596 Refspec: refspec,
597597 }
598598 }
......@@ -614,13 +614,13 @@ func (c *Config) writeRepo() *BranchOutput {
614614 })
615615
616616 for _, revData := range revs {
617- data := &PageData{
617+ data := &PageData{
618618 Repo: c,
619619 RevData: revData,
620620 SiteURLs: c.getURLs(),
621621 }
622622
623- branchOutput := c.writeBranch(repo, data, refInfoList)
623+ branchOutput := c.writeRevision(repo, data, refInfoList)
624624 if !claimed {
625625 mainOutput = branchOutput
626626 claimed = true
......@@ -645,8 +645,12 @@ func (c *Config) writeRepo() *BranchOutput {
645645 return mainOutput
646646 }
647647
648-func (c *Config) writeBranch(repo *git.Repository, pageData *PageData, refs []*RefInfo) *BranchOutput {
649- fmt.Printf("compiling (%s) branch (%s)\n", c.RepoName, pageData.RevData.RevName)
648+func (c *Config) writeRevision(repo *git.Repository, pageData *PageData, refs []*RefInfo) *BranchOutput {
649+ c.Logger.Infof(
650+ "compiling (%s) revision (%s)",
651+ c.RepoName,
652+ pageData.RevData.RevName,
653+ )
650654
651655 output := &BranchOutput{}
652656 pageSize := pageData.Repo.MaxCommits
......@@ -677,7 +681,7 @@ func (c *Config) writeBranch(repo *git.Repository, pageData *PageData, refs []*R
677681 AuthorStr: commit.Author.Name,
678682 WhenStr: timediff.TimeDiff(commit.Author.When),
679683 Commit: commit,
680- Refs: tags,
684+ Refs: tags,
681685 })
682686 }
683687