summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSato Hiroyuki <sathiroyuki@gmail.com>2013-02-26 21:20:14 +0900
committerSato Hiroyuki <sathiroyuki@gmail.com>2013-02-26 21:20:14 +0900
commitaa36f07a02b524c843374968af6a6c122d980bd7 (patch)
tree8e213b5ca20442f5fdd20e1ec7d71d32167ee92e
parentd8a40d8c933da8e89013e989940f8b60d0f2e247 (diff)
downloadgitlab-ce-aa36f07a02b524c843374968af6a6c122d980bd7.tar.gz
Fix the commits are not ordered commiter date.
It is fixed that the date label of network graph is broken.
-rw-r--r--app/models/graph/json_builder.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/graph/json_builder.rb b/app/models/graph/json_builder.rb
index 8440b5d5cdf..06805fd4a00 100644
--- a/app/models/graph/json_builder.rb
+++ b/app/models/graph/json_builder.rb
@@ -32,7 +32,7 @@ module Graph
#
def collect_commits
- @commits = Grit::Commit.find_all(repo, nil, {topo_order: true, max_count: self.class.max_count, skip: to_commit}).dup
+ @commits = Grit::Commit.find_all(repo, nil, {date_order: true, max_count: self.class.max_count, skip: to_commit}).dup
# Decorate with app/models/commit.rb
@commits.map! { |commit| Commit.new(commit) }
@@ -85,7 +85,7 @@ module Graph
# Skip count that the target commit is displayed in center.
def to_commit
- commits = Grit::Commit.find_all(repo, nil, {topo_order: true})
+ commits = Grit::Commit.find_all(repo, nil, {date_order: true})
commit_index = commits.index do |c|
c.id == @commit.id
end