diff options
| author | Robert Speicher <robert@gitlab.com> | 2016-06-29 02:26:38 +0000 |
|---|---|---|
| committer | Robert Speicher <robert@gitlab.com> | 2016-06-29 02:26:38 +0000 |
| commit | 5423e6e2d5f47ea72958086c545fb9f55ce320cb (patch) | |
| tree | 774d00d6e81a55020537854bb9557787a0dbfc18 /lib | |
| parent | d171ff17beb82c2378c1eae52dada91481a48239 (diff) | |
| parent | db0a6c10edff0eebe81297763dd9e0a9965c507f (diff) | |
| download | gitlab-ce-5423e6e2d5f47ea72958086c545fb9f55ce320cb.tar.gz | |
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.rb | 13 |
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) |
