improvements

This commit is contained in:
Lunny Xiao
2025-07-14 09:58:28 -07:00
parent 345ae04837
commit f8cea67265
6 changed files with 68 additions and 28 deletions

View File

@@ -258,11 +258,7 @@ func (c *Commit) CommitsBeforeLimit(num int) ([]*Commit, error) {
// CommitsBeforeUntil returns the commits between commitID to current revision
func (c *Commit) CommitsBeforeUntil(commitID string) ([]*Commit, error) {
endCommit, err := c.repo.GetCommit(commitID)
if err != nil {
return nil, err
}
return c.repo.CommitsBetween(c, endCommit)
return c.repo.CommitsBetween(c.ID.String(), commitID)
}
// SearchCommitsOptions specify the parameters for SearchCommits