Fixed go linting

This commit is contained in:
Thomas Sayen 2025-06-11 12:11:55 +02:00 committed by Thomas Sayen
parent 308119f1c7
commit a9d4c149f6
1 changed files with 1 additions and 3 deletions

View File

@ -174,7 +174,6 @@ type CommitsCountOptions struct {
// CommitsCount returns number of total commits of until given revision.
func CommitsCount(ctx context.Context, opts CommitsCountOptions) (int64, error) {
var cmd *Command
cmd = nil
followRename := len(opts.RelPath) > 0 && opts.FollowRename
if followRename {
@ -202,9 +201,8 @@ func CommitsCount(ctx context.Context, opts CommitsCountOptions) (int64, error)
}
if followRename {
return int64(len(strings.Split(stdout, "\n"))), nil
} else {
return strconv.ParseInt(strings.TrimSpace(stdout), 10, 64)
}
return strconv.ParseInt(strings.TrimSpace(stdout), 10, 64)
}
// CommitsCount returns number of total commits of until current revision.