Fixed: wrong commit committed_date.
This commit is contained in:
parent
6ba72db818
commit
113a91501f
|
@ -93,8 +93,9 @@ module GitHelper
|
|||
end
|
||||
|
||||
def split_commits_by_date(commits)
|
||||
commits.sort{|x, y| y.authored_date <=> x.authored_date}.inject({}) do |h, commit|
|
||||
dt = commit.authored_date
|
||||
# See: https://github.com/gitlabhq/gitlabhq/blob/master/app/views/projects/commits/_commits.html.haml#L1
|
||||
commits.sort{|x, y| y.committed_date <=> x.committed_date}.inject({}) do |h, commit|
|
||||
dt = commit.committed_date
|
||||
h[dt.year] ||= {}
|
||||
h[dt.year][dt.month] ||= {}
|
||||
h[dt.year][dt.month][dt.day] ||= []
|
||||
|
|
|
@ -61,7 +61,7 @@ class GitPresenters::CommitAsMessagePresenter < ApplicationPresenter
|
|||
end
|
||||
|
||||
def content?
|
||||
!content.blank?
|
||||
content.present?
|
||||
end
|
||||
|
||||
def caption?
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
- by_month.each_pair do |month, by_day|
|
||||
- by_day.each_pair do |day, commits|
|
||||
.date-block
|
||||
.date= raw l(commits.first.authored_date, format: :date_block_format)
|
||||
.date= raw l(commits.first.committed_date, format: :date_block_format)
|
||||
.messages
|
||||
- commits.each_with_index do |commit|
|
||||
- GitPresenters::CommitAsMessagePresenter.present(commit, project: @project) do |presenter|
|
||||
|
|
Loading…
Reference in New Issue