diff options
author | Robert Speicher <robert@gitlab.com> | 2017-06-12 17:40:56 +0300 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2017-06-12 17:40:56 +0300 |
commit | dd180798fa4073017df9d8a3574e036773f06d33 (patch) | |
tree | f7afc534041e05b98eb0abea1738d63248a16988 /lib/gitlab | |
parent | 6ff244fd7117cc3e7345340650b70fa851792f79 (diff) | |
parent | 4282e610f7525b9c316564055f28156fe4ea2975 (diff) |
Merge branch '33525-use-git-diff-instead-of-git-format-patch' into 'master'
Generate patch with git diff instead of git format-patch
Closes #33525
See merge request !12060
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/ee_compat_check.rb | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/gitlab/ee_compat_check.rb b/lib/gitlab/ee_compat_check.rb index 38e27513281..6d326ee213a 100644 --- a/lib/gitlab/ee_compat_check.rb +++ b/lib/gitlab/ee_compat_check.rb @@ -76,13 +76,9 @@ module Gitlab step( "Generating the patch against origin/master in #{patch_path}", - %w[git format-patch origin/master --stdout] + %W[git diff --binary origin/master > #{patch_path}] ) do |output, status| - throw(:halt_check, :ko) unless status.zero? - - File.write(patch_path, output) - - throw(:halt_check, :ko) unless File.exist?(patch_path) + throw(:halt_check, :ko) unless status.zero? && File.exist?(patch_path) end end @@ -296,7 +292,7 @@ module Gitlab # In the CE repo $ git fetch origin master - $ git format-patch origin/master --stdout > #{ce_branch}.patch + $ git diff --binary origin/master > #{ce_branch}.patch # In the EE repo $ git fetch origin master |