diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-03-17 17:51:14 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-03-18 16:28:50 +0300 |
commit | 9d938fd77da033f09530571a6194609aee8bbc7b (patch) | |
tree | 236b12b7cad36ab2eebd9111fe8234949659e9d4 /app/views/events | |
parent | dbd347bfa00e133da8ac178612ed8c30ef871ca4 (diff) |
List new commits for newly pushed branch in activity view.
Diffstat (limited to 'app/views/events')
-rw-r--r-- | app/views/events/event/_push.html.haml | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/app/views/events/event/_push.html.haml b/app/views/events/event/_push.html.haml index 489138887ae..60d7978b13f 100644 --- a/app/views/events/event/_push.html.haml +++ b/app/views/events/event/_push.html.haml @@ -21,5 +21,11 @@ %li.commits-stat - if event.commits_count > 2 %span ... and #{event.commits_count - 2} more commits. - = link_to namespace_project_compare_path(event.project.namespace, event.project, from: event.commit_from, to: event.commit_to) do - %strong Compare → #{truncate_sha(event.commit_from)}...#{truncate_sha(event.commit_to)} + - if event.md_ref? + - from = event.commit_from + - from_label = truncate_sha(from) + - else + - from = event.project.default_branch + - from_label = from + = link_to namespace_project_compare_path(event.project.namespace, event.project, from: from, to: event.commit_to) do + %strong Compare → #{from_label}...#{truncate_sha(event.commit_to)} |