summaryrefslogtreecommitdiff
path: root/lib/gitlab/workhorse.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/workhorse.rb')
-rw-r--r--lib/gitlab/workhorse.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/gitlab/workhorse.rb b/lib/gitlab/workhorse.rb
index 40e8299c36b..ef1241f8600 100644
--- a/lib/gitlab/workhorse.rb
+++ b/lib/gitlab/workhorse.rb
@@ -52,6 +52,19 @@ module Gitlab
]
end
+ def send_git_patch(repository, from, to)
+ params = {
+ 'RepoPath' => repository.path_to_repo,
+ 'ShaFrom' => from,
+ 'ShaTo' => to
+ }
+
+ [
+ SEND_DATA_HEADER,
+ "git-format-patch:#{encode(params)}"
+ ]
+ end
+
protected
def encode(hash)