Skip to content

Commit

Permalink
Merge branch 'bugfix/references-sort-timestamps' of github.com:krylov…
Browse files Browse the repository at this point in the history
…sk/go-git into bugfix/references-sort-timestamps
  • Loading branch information
mcuadros committed Oct 15, 2018
2 parents 0381008 + ba267cb commit d4848fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion references.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ func (s commitSorterer) Len() int {
}

func (s commitSorterer) Less(i, j int) bool {
return s.l[i].Committer.When.Before(s.l[j].Committer.When)
return s.l[i].Committer.When.Before(s.l[j].Committer.When) ||
s.l[i].Committer.When.Equal(s.l[j].Committer.When) &&
s.l[i].Author.When.Before(s.l[j].Author.When)
}

func (s commitSorterer) Swap(i, j int) {
Expand Down

0 comments on commit d4848fd

Please sign in to comment.