]> Sergey Matveev's repositories - sgblog.git/commitdiff
Fix variable name
authorSergey Matveev <stargrave@stargrave.org>
Sat, 14 Mar 2020 10:16:00 +0000 (13:16 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sat, 14 Mar 2020 10:16:00 +0000 (13:16 +0300)
cmd/sgblog/main.go

index df9e0750269797a8c06b93b0063ec166a1dfddfd..2db6dbeb2316f37e943bfe955b8ad6f407cdfe4d 100644 (file)
@@ -352,12 +352,12 @@ func main() {
                if err != nil {
                        makeErr(err)
                }
-               commentN := 0
+               commitN := 0
                for i := 0; i < offset; i++ {
                        if _, err = repoLog.Next(); err != nil {
                                break
                        }
-                       commentN++
+                       commitN++
                }
 
                entries := make([]TableEntry, 0, PageEntries)
@@ -390,7 +390,7 @@ func main() {
                                `<th size="5%"><a title="Comments">C</a></th>` +
                                "<th>Linked to</th></tr>\n")
                for _, entry := range entries {
-                       commentN++
+                       commitN++
                        lines := msgSplit(entry.commit.Message)
                        domains := []string{}
                        for _, line := range lines[2:] {
@@ -411,7 +411,7 @@ func main() {
                                        "<td>%s</td>"+
                                        "<td>%d</td><td>%s</td>"+
                                        "<td>%s</td></tr>\n",
-                               commentN, entry.commit.Author.When.Format(sgblog.WhenFmt),
+                               commitN, entry.commit.Author.When.Format(sgblog.WhenFmt),
                                makeA(cfg.URLPrefix+"/"+entry.commit.Hash.String(), lines[0]),
                                len(lines)-2,
                                commentsValue,