summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@gitlab.com>2015-03-18 17:47:02 +0000
committerDmitriy Zaporozhets <dzaporozhets@gitlab.com>2015-03-18 17:47:02 +0000
commitfec5f807bb4b89c22e0e8ea820ea462f15f14165 (patch)
tree38c8bf5af78ef4f740bc2f840db1f9aba870ed66 /app/models
parent1646bfc273458440a2f027b04ab49ebbb8b441ed (diff)
parent9d938fd77da033f09530571a6194609aee8bbc7b (diff)
downloadgitlab-ce-fec5f807bb4b89c22e0e8ea820ea462f15f14165.tar.gz
Merge branch 'new-branch-commits' into 'master'
List new commits for newly pushed branch in activity view. When someone pushes commits, I want to see them, regardless if it's a new or existing branch. If it's a new branch, we compare with the default branch (usually master). ![Screen_Shot_2015-03-17_at_15.49.13](https://dev.gitlab.org/gitlab/gitlabhq/uploads/4cb7e0d833bc83a30197db81d4b273bc/Screen_Shot_2015-03-17_at_15.49.13.png) See merge request !1711
Diffstat (limited to 'app/models')
-rw-r--r--app/models/event.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/event.rb b/app/models/event.rb
index 8d20d7ef252..2103a48a71b 100644
--- a/app/models/event.rb
+++ b/app/models/event.rb
@@ -247,7 +247,7 @@ class Event < ActiveRecord::Base
end
def push_with_commits?
- md_ref? && commits.any? && commit_from && commit_to
+ !commits.empty? && commit_from && commit_to
end
def last_push_to_non_root?