Select Git revision
merge_request_diff.rb
Forked from
GitLab.org / GitLab FOSS
Source project has a limited visibility.
-
Sean McGivern authored
`Gitlab::Git::Compare` will already have the correct order; sorting in Ruby can only ruin that. (The correct order being the same as `git log` - reverse chronological while maintaining the commit graph.) As an example, imagine a branch where someone has their system clock set wrong for some of the commits. Not only will those commits be in the wrong order - which is maybe reasonable - but sorting in Ruby can also put commits with the same timestamp out of order, as Ruby's sorting isn't stable.
Sean McGivern authored`Gitlab::Git::Compare` will already have the correct order; sorting in Ruby can only ruin that. (The correct order being the same as `git log` - reverse chronological while maintaining the commit graph.) As an example, imagine a branch where someone has their system clock set wrong for some of the commits. Not only will those commits be in the wrong order - which is maybe reasonable - but sorting in Ruby can also put commits with the same timestamp out of order, as Ruby's sorting isn't stable.