summaryrefslogtreecommitdiff
path: root/app/services/files
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-07-16 16:03:07 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-07-16 16:03:07 +0200
commita7fded9b9529cfc08463afd4f6cf12478262e951 (patch)
tree69a0acd9145acc15a5f90a9bac07f041ccf62e72 /app/services/files
parent26f5d6047d6e21a5c65a4276266648f1e69aac4a (diff)
downloadgitlab-ce-a7fded9b9529cfc08463afd4f6cf12478262e951.tar.gz
Huge refactoring for accepting merge requests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/services/files')
-rw-r--r--app/services/files/base_service.rb9
1 files changed, 1 insertions, 8 deletions
diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb
index f587ee266da..d7b40ee8906 100644
--- a/app/services/files/base_service.rb
+++ b/app/services/files/base_service.rb
@@ -33,15 +33,8 @@ module Files
private
- def repository
- project.repository
- end
-
def after_commit(sha, branch)
- commit = repository.commit(sha)
- full_ref = 'refs/heads/' + branch
- old_sha = commit.parent_id || Gitlab::Git::BLANK_SHA
- GitPushService.new.execute(project, current_user, old_sha, sha, full_ref)
+ PostCommitService.new(project, current_user).execute(sha, branch)
end
def current_branch