aboutsummaryrefslogtreecommitdiff
path: root/pkg/git
diff options
context:
space:
mode:
authorGabriel A. Giovanini <mail@gabrielgio.me>2024-06-15 18:42:48 +0200
committerGabriel A. Giovanini <mail@gabrielgio.me>2024-06-15 18:42:48 +0200
commitb71c6c0e5b8dd00d44e40ac0551902a23cbe19d5 (patch)
tree55dc40918dc3adb2171dd9f9bc4cfe92f9f5e769 /pkg/git
parentd2c4023832e26d3fe3f77c9fa8581588ea812cc2 (diff)
downloadcerrado-b71c6c0e5b8dd00d44e40ac0551902a23cbe19d5.tar.gz
cerrado-b71c6c0e5b8dd00d44e40ac0551902a23cbe19d5.tar.bz2
cerrado-b71c6c0e5b8dd00d44e40ac0551902a23cbe19d5.zip
feat: Add summary page
Diffstat (limited to 'pkg/git')
-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