Skip to content

Commit c1ec354

Browse files
author
Thomas Sayen
committed
Fixed go linting
1 parent 6bf3c18 commit c1ec354

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

modules/git/commit.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ type CommitsCountOptions struct {
174174
// CommitsCount returns number of total commits of until given revision.
175175
func CommitsCount(ctx context.Context, opts CommitsCountOptions) (int64, error) {
176176
var cmd *Command
177-
cmd = nil
178177
followRename := len(opts.RelPath) > 0 && opts.FollowRename
179178

180179
if followRename {
@@ -202,9 +201,8 @@ func CommitsCount(ctx context.Context, opts CommitsCountOptions) (int64, error)
202201
}
203202
if followRename {
204203
return int64(len(strings.Split(stdout, "\n"))), nil
205-
} else {
206-
return strconv.ParseInt(strings.TrimSpace(stdout), 10, 64)
207204
}
205+
return strconv.ParseInt(strings.TrimSpace(stdout), 10, 64)
208206
}
209207

210208
// CommitsCount returns number of total commits of until current revision.

0 commit comments

Comments
 (0)