From 46d752ce218d833ff947bd4503de56300471a8cb Mon Sep 17 00:00:00 2001
From: Lin Jen-Shin <godfat@godfat.org>
Date: Wed, 14 Dec 2016 02:03:04 +0800
Subject: [PATCH] Use a regular class for GitOperationService

Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237#note_19747793
---
 app/services/git_operation_service.rb | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/app/services/git_operation_service.rb b/app/services/git_operation_service.rb
index 62a9eda3eba..9a052f952cf 100644
--- a/app/services/git_operation_service.rb
+++ b/app/services/git_operation_service.rb
@@ -1,5 +1,12 @@
 
-GitOperationService = Struct.new(:user, :repository) do
+class GitOperationService
+  attr_reader :user, :repository
+
+  def initialize(new_user, new_repository)
+    @user = new_user
+    @repository = new_repository
+  end
+
   def add_branch(branch_name, newrev)
     ref = Gitlab::Git::BRANCH_REF_PREFIX + branch_name
     oldrev = Gitlab::Git::BLANK_SHA
-- 
GitLab