Fix the commits are not ordered commiter date.
It is fixed that the date label of network graph is broken.
This commit is contained in:
parent
d8a40d8c93
commit
aa36f07a02
1 changed files with 2 additions and 2 deletions
|
@ -32,7 +32,7 @@ module Graph
|
||||||
#
|
#
|
||||||
def collect_commits
|
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
|
# Decorate with app/models/commit.rb
|
||||||
@commits.map! { |commit| Commit.new(commit) }
|
@commits.map! { |commit| Commit.new(commit) }
|
||||||
|
@ -85,7 +85,7 @@ module Graph
|
||||||
|
|
||||||
# Skip count that the target commit is displayed in center.
|
# Skip count that the target commit is displayed in center.
|
||||||
def to_commit
|
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|
|
commit_index = commits.index do |c|
|
||||||
c.id == @commit.id
|
c.id == @commit.id
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue