Commit 9dccecc9b54240a7088ceac554c3f9b6b24d51f7

Authored by Sato Hiroyuki
1 parent df85c9c0

Sort the commits on network graph by commiter date.

Author date is not updated, if the commits is rebased.
So the network graph having many rebased commit turns round and round,
that it is very difficult to undarstand history.
Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
lib/gitlab/graph/json_builder.rb
... ... @@ -33,7 +33,7 @@ module Gitlab
33 33 #
34 34 def collect_commits
35 35  
36   - @commits = Grit::Commit.find_all(repo, nil, {max_count: self.class.max_count, skip: to_commit}).dup
  36 + @commits = Grit::Commit.find_all(repo, nil, {topo_order: true, max_count: self.class.max_count, skip: to_commit}).dup
37 37  
38 38 # Decorate with app/models/commit.rb
39 39 @commits.map! { |commit| ::Commit.new(commit) }
... ... @@ -86,7 +86,7 @@ module Gitlab
86 86  
87 87 # Skip count that the target commit is displayed in center.
88 88 def to_commit
89   - commits = Grit::Commit.find_all(repo, nil)
  89 + commits = Grit::Commit.find_all(repo, nil, {topo_order: true})
90 90 commit_index = commits.index do |c|
91 91 c.id == @commit.id
92 92 end
... ...