| ... | @@ -87,14 +87,10 @@ class Commit |
... | @@ -87,14 +87,10 @@ class Commit |
|
|
last = project.commit(from.try(:strip))
|
|
last = project.commit(from.try(:strip))
|
|
|
|
|
|
|
|
if first && last
|
|
if first && last
|
|
|
commits = [first, last].sort_by(&:created_at)
|
|
result[:same] = (first.id == last.id)
|
|
|
younger = commits.first
|
|
result[:commits] = project.repo.commits_between(last.id, first.id).map {|c| Commit.new(c)}
|
|
|
older = commits.last
|
|
result[:diffs] = project.repo.diff(last.id, first.id) rescue []
|
|
|
|
|
result[:commit] = Commit.new(first)
|
|
|
result[:same] = (younger.id == older.id)
|
|
|
|
|
result[:commits] = project.repo.commits_between(younger.id, older.id).map {|c| Commit.new(c)}
|
|
|
|
|
result[:diffs] = project.repo.diff(younger.id, older.id) rescue []
|
|
|
|
|
result[:commit] = Commit.new(older)
|
|
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
result
|
|
result
|
| ... | |
... | |
| ... | | ... | |