Commit 9dccecc9 authored by Sato Hiroyuki's avatar Sato Hiroyuki

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.
parent df85c9c0
......@@ -33,7 +33,7 @@ module Gitlab
#
def collect_commits
@commits = Grit::Commit.find_all(repo, nil, {max_count: self.class.max_count, skip: to_commit}).dup
@commits = Grit::Commit.find_all(repo, nil, {topo_order: true, max_count: self.class.max_count, skip: to_commit}).dup
# Decorate with app/models/commit.rb
@commits.map! { |commit| ::Commit.new(commit) }
......@@ -86,7 +86,7 @@ module Gitlab
# Skip count that the target commit is displayed in center.
def to_commit
commits = Grit::Commit.find_all(repo, nil)
commits = Grit::Commit.find_all(repo, nil, {topo_order: true})
commit_index = commits.index do |c|
c.id == @commit.id
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment