diff options
author | Z.J. van de Weg <zegerjan@gitlab.com> | 2016-06-10 15:57:50 +0300 |
---|---|---|
committer | Z.J. van de Weg <zegerjan@gitlab.com> | 2016-06-28 15:26:38 +0300 |
commit | c31f876a275c03111488ef72474116a619ffb0d8 (patch) | |
tree | 11c055a9b0552cef4032745c73cea6e6670da005 /lib/gitlab/workhorse.rb | |
parent | e0e325625eb141445720999d4e4a4d60a4b59d95 (diff) |
Workhorse to serve email diffs
Depends on the changes in Workhorse (gitlab-org/gitlab-workhorse!48).
Diffstat (limited to 'lib/gitlab/workhorse.rb')
-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..5c3449f0b5b 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) |