Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-03-17 17:51:14 +0300
committerDouwe Maan <douwe@gitlab.com>2015-03-18 16:28:50 +0300
commit9d938fd77da033f09530571a6194609aee8bbc7b (patch)
tree236b12b7cad36ab2eebd9111fe8234949659e9d4 /app/views/events/event/_push.html.haml
parentdbd347bfa00e133da8ac178612ed8c30ef871ca4 (diff)
List new commits for newly pushed branch in activity view.
Diffstat (limited to 'app/views/events/event/_push.html.haml')
-rw-r--r--app/views/events/event/_push.html.haml10
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 &rarr; #{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 &rarr; #{from_label}...#{truncate_sha(event.commit_to)}