summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-03-13 21:22:13 +0000
committerDouwe Maan <douwe@gitlab.com>2015-03-13 21:22:13 +0000
commit42e97d2891d75639cfcb82a8a48b3633ed21a5f1 (patch)
tree086c0d64ea117389223110daf54030e6be65eb60
parent07f9a3f928d39accf876d052b265844f74130099 (diff)
parent2172d7ff9e6369d963199348291046f6e06a4215 (diff)
downloadgitlab-ce-42e97d2891d75639cfcb82a8a48b3633ed21a5f1.tar.gz
Merge branch 'fix_tests' into 'master'
Fix failing tests Revert the last merge, as it breaks the master and I didn't see that this line is used in hooks as well when I merged this. See merge request !390
-rw-r--r--CHANGELOG1
-rw-r--r--app/services/git_push_service.rb3
2 files changed, 3 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG
index faf74ff2555..5ccedcbc8c5 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,7 +2,6 @@ Please view this file on the master branch, on stable branches it's out of date.
v 7.9.0 (unreleased)
- Update documentation for object_kind field in Webhook push and tag push Webhooks (Stan Hu)
- - Remove unnecessary fetch of commit messages on initial push (Perforce Software)
- Fix broken email images (Hannes Rosenögger)
- Fix mass SQL statements on initial push (Hannes Rosenögger)
- Add tag push notifications and normalize HipChat and Slack messages to be consistent (Stan Hu)
diff --git a/app/services/git_push_service.rb b/app/services/git_push_service.rb
index e4c30dd6dfc..4885e1b2fc5 100644
--- a/app/services/git_push_service.rb
+++ b/app/services/git_push_service.rb
@@ -29,6 +29,9 @@ class GitPushService
elsif push_to_new_branch?(ref, oldrev)
# Re-find the pushed commits.
if is_default_branch?(ref)
+ # Initial push to the default branch. Take the full history of that branch as "newly pushed".
+ @push_commits = project.repository.commits(newrev)
+
# Set protection on the default branch if configured
if (current_application_settings.default_branch_protection != PROTECTION_NONE)
developers_can_push = current_application_settings.default_branch_protection == PROTECTION_DEV_CAN_PUSH ? true : false