aboutsummaryrefslogtreecommitdiff
path: root/pkg/git/git.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/git/git.go')
-rw-r--r--pkg/git/git.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/git/git.go b/pkg/git/git.go
index 428bfb1..b725cd8 100644
--- a/pkg/git/git.go
+++ b/pkg/git/git.go
@@ -77,7 +77,7 @@ func (g *GitRepository) LastCommit() (*object.Commit, error) {
return c, nil
}
-func (g *GitRepository) Commits() ([]*object.Commit, error) {
+func (g *GitRepository) Commits(count int) ([]*object.Commit, error) {
err := g.validateRef()
if err != nil {
return nil, err
@@ -90,7 +90,7 @@ func (g *GitRepository) Commits() ([]*object.Commit, error) {
commits := []*object.Commit{}
// TODO: for now only load first 1000
- for x := 0; x < 1000; x++ {
+ for x := 0; x < count; x++ {
c, err := ci.Next()
if err != nil && errors.Is(err, io.EOF) {
break