diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2017-04-26 09:23:22 +0000 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2017-04-27 13:09:54 +0000 |
commit | a7e67604b3c64a4a9e0cea6e0f9b1fa85d1c30af (patch) | |
tree | 2f581d58f6cb0fa20b5c83ef988835ee75a70b9c /app/models/network | |
parent | 3c6fad64296738239582ad449bb202cfd99ba7ff (diff) | |
download | gitlab-ce-a7e67604b3c64a4a9e0cea6e0f9b1fa85d1c30af.tar.gz |
Fix ordering of commits in the network graph.
- We upgraded `rugged` to 0.25.1.1 in !10286 for %9.1
- Prior to this upgrade, the default sort order for commits returned by
`Gitlab::Git::Repository#find_commits` was `Rugged::SORT_DATE`, which the
graph relied on.
- While upgrading `rugged`, the MR also changed this default to
`Rugged::SORT_NONE`, which broke commit ordering in the graph.
- This commit adds an option to `Gitlab::Git::Repository#find_commits` to sort
by date, and changes the graph builder `Network::Graph` so it explictly
requests the `:date` sort order
Diffstat (limited to 'app/models/network')
-rw-r--r-- | app/models/network/graph.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/network/graph.rb b/app/models/network/graph.rb index 0bbc9451ffd..59737bb6085 100644 --- a/app/models/network/graph.rb +++ b/app/models/network/graph.rb @@ -107,7 +107,8 @@ module Network def find_commits(skip = 0) opts = { max_count: self.class.max_count, - skip: skip + skip: skip, + order: :date } opts[:ref] = @commit.id if @filter_ref |