]> Sergey Matveev's repositories - sgblog.git/blobdiff - cmd/sgblog/topics.go
sgblog-topics helper command
[sgblog.git] / cmd / sgblog / topics.go
index 8e34bb43409af0b9350a60434e1ee2b541b43cf4..be70e733ede38a7700a92124200d0a9f8b84619b 100644 (file)
@@ -27,6 +27,7 @@ import (
 
        "github.com/go-git/go-git/v5/plumbing"
        "github.com/go-git/go-git/v5/plumbing/object"
+       "go.stargrave.org/sgblog"
 )
 
 type TopicsCache map[string][]plumbing.Hash
@@ -75,7 +76,7 @@ NoCache:
                if err != nil {
                        break
                }
-               for _, topic := range parseTopics(getNote(topicsTree, commit.Hash)) {
+               for _, topic := range sgblog.ParseTopics(sgblog.GetNote(repo, topicsTree, commit.Hash)) {
                        cache[topic] = append(cache[topic], commit.Hash)
                }
        }