Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Andrew <mail@timothyandrew.net>2017-04-26 12:23:22 +0300
committerTimothy Andrew <mail@timothyandrew.net>2017-04-27 16:09:54 +0300
commita7e67604b3c64a4a9e0cea6e0f9b1fa85d1c30af (patch)
tree2f581d58f6cb0fa20b5c83ef988835ee75a70b9c /app/models/network
parent3c6fad64296738239582ad449bb202cfd99ba7ff (diff)
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.rb3
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