diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2018-10-15 11:46:22 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2018-10-15 11:46:22 +0200 |
commit | d4848fd74ed8dfdc0038a29e081928d38c013618 (patch) | |
tree | 93d4d1fa1c089618a1da39ce32da83101ff627f6 | |
parent | 03810084a0cdb9eb432651979b0784a9fd92736a (diff) | |
parent | ba267cb676e2ab06fc57e1612f7534d1d8501957 (diff) | |
download | go-git-d4848fd74ed8dfdc0038a29e081928d38c013618.tar.gz |
Merge branch 'bugfix/references-sort-timestamps' of github.com:krylovsk/go-git into bugfix/references-sort-timestamps
-rw-r--r-- | references.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/references.go b/references.go index a1872a5..5673ac1 100644 --- a/references.go +++ b/references.go @@ -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) { |