Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2016-06-29 05:26:38 +0300
committerRobert Speicher <robert@gitlab.com>2016-06-29 05:26:38 +0300
commit5423e6e2d5f47ea72958086c545fb9f55ce320cb (patch)
tree774d00d6e81a55020537854bb9557787a0dbfc18 /lib
parentd171ff17beb82c2378c1eae52dada91481a48239 (diff)
parentdb0a6c10edff0eebe81297763dd9e0a9965c507f (diff)
Merge branch 'zj-workhorse-format-patch' into 'master'
Workhorse to serve email diffs See merge request !4590
Diffstat (limited to 'lib')
-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)