diff --git a/commit.go b/commit.go index a7a205c..adde7ed 100644 --- a/commit.go +++ b/commit.go @@ -142,7 +142,7 @@ func commitsCount(repoPath, revision, relpath string) (int64, error) { } if isFallback { - return int64(len(strings.Split(stdout, "\n"))), nil + return int64(strings.Count(stdout, "\n")), nil } return strconv.ParseInt(strings.TrimSpace(stdout), 10, 64) }