From 9bb5986d4afff761ddc344413fdb34babb4c9d70 Mon Sep 17 00:00:00 2001 From: Elliot Date: Thu, 12 Mar 2015 13:35:51 -0700 Subject: Remove unnecessary fetch of commit messages for initial push. This will reduce the memory usage significantly. --- CHANGELOG | 1 + app/services/git_push_service.rb | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index b0adaeb101b..896e6a6531b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ Please view this file on the master branch, on stable branches it's out of date. v 7.9.0 (unreleased) + - 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 bfabfd7ade3..232028b1e0b 100644 --- a/app/services/git_push_service.rb +++ b/app/services/git_push_service.rb @@ -29,9 +29,6 @@ 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 -- cgit v1.2.1 From 2172d7ff9e6369d963199348291046f6e06a4215 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20Rosen=C3=B6gger?= <123haynes@gmail.com> Date: Fri, 13 Mar 2015 22:17:51 +0100 Subject: Revert "Merge branch 'follow-on-mr376' into 'master'" This reverts commit 07f9a3f928d39accf876d052b265844f74130099, reversing changes made to 4803675190833cdf7e83558a32b2f2ea3283dce0. Reverted this because the data is used in hooks as well. --- CHANGELOG | 1 - app/services/git_push_service.rb | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) 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 -- cgit v1.2.1