Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Commit d4848fd

Browse files
committed
Merge branch 'bugfix/references-sort-timestamps' of github.com:krylovsk/go-git into bugfix/references-sort-timestamps
2 parents 0381008 + ba267cb commit d4848fd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

references.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ func (s commitSorterer) Len() int {
4747
}
4848

4949
func (s commitSorterer) Less(i, j int) bool {
50-
return s.l[i].Committer.When.Before(s.l[j].Committer.When)
50+
return s.l[i].Committer.When.Before(s.l[j].Committer.When) ||
51+
s.l[i].Committer.When.Equal(s.l[j].Committer.When) &&
52+
s.l[i].Author.When.Before(s.l[j].Author.When)
5153
}
5254

5355
func (s commitSorterer) Swap(i, j int) {

0 commit comments

Comments
 (0)