aboutsummaryrefslogtreecommitdiff
path: root/pkg/service
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/service')
-rw-r--r--pkg/service/git.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/service/git.go b/pkg/service/git.go
index 12d238e..2d00715 100644
--- a/pkg/service/git.go
+++ b/pkg/service/git.go
@@ -81,22 +81,22 @@ func (g *GitService) ListRepositories() ([]*Repository, error) {
return repos, nil
}
-func (g *GitService) ListCommits(name, ref string, count int) ([]*object.Commit, error) {
+func (g *GitService) ListCommits(name, ref, from string, count int) ([]*object.Commit, *object.Commit, error) {
r := g.configRepo.GetByName(name)
if r == nil {
- return nil, ErrRepositoryNotFound
+ return nil, nil, ErrRepositoryNotFound
}
repo, err := git.OpenRepository(r.Path)
if err != nil {
- return nil, err
+ return nil, nil, err
}
err = repo.SetRef(ref)
if err != nil {
- return nil, err
+ return nil, nil, err
}
- return repo.Commits(count)
+ return repo.Commits(count, from)
}
func (g *GitService) LastCommit(name, ref string) (*object.Commit, error) {