cmd/sgblog/http.go | 5 ++++- common.go | 2 +- diff --git a/cmd/sgblog/http.go b/cmd/sgblog/http.go index aad09625891b5d508cc2ceea5f19424cc81417e803c8e5d34ed18219afea32ff..9fa38b2f1221c19a21b7b2e1ea79004a1b34a98d3d32856e64aa099caf8cfdfd 100644 --- a/cmd/sgblog/http.go +++ b/cmd/sgblog/http.go @@ -473,10 +473,13 @@ } commentedHash := plumbing.NewHash(strings.ReplaceAll( fileStats[0].Name, "/", "", )) - comments := parseComments(getNote(t, commentedHash)) commit, err = repo.CommitObject(commentedHash) if err != nil { makeErr(err) + } + comments := parseComments(getNote(t, commentedHash)) + if len(comments) == 0 { + continue } commentN := strconv.Itoa(len(comments) - 1) lines := strings.Split(comments[len(comments)-1], "\n") diff --git a/common.go b/common.go index 7f1c19704c22584beb16807524e1a771841ededeeefb579166a2b1bcd74a05e5..03ccde2422d085c05a7df6dfac157e9de0316c622b1832fecc81a3842117b3d0 100644 --- a/common.go +++ b/common.go @@ -2,6 +2,6 @@ // SGBlog -- Git-backed CGI/inetd blogging/phlogging engine package sgblog const ( - Version = "0.6.4" + Version = "0.6.5" WhenFmt = "2006-01-02 15:04:05Z07:00" )