Fix commit count with git version < 1.8.0

With format='' the output does not end with a newline (checked)
This commit is contained in:
Sandro Santilli
2016-08-31 08:34:54 +02:00
parent 424b048ee6
commit 5ebab5d5ec
+1 -1
View File
@@ -142,7 +142,7 @@ func commitsCount(repoPath, revision, relpath string) (int64, error) {
}
if isFallback {
return int64(strings.Count(stdout, "\n")), nil
return int64(strings.Count(stdout, "\n")) + 1, nil
}
return strconv.ParseInt(strings.TrimSpace(stdout), 10, 64)
}