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
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-06-09 18:50:53 +0300
committerRémy Coutable <remy@rymai.me>2017-06-09 18:50:53 +0300
commit4282e610f7525b9c316564055f28156fe4ea2975 (patch)
tree5983a8295c54b19ab3f19ea513c6e61c42b9a3af /lib/gitlab/ee_compat_check.rb
parent320590180703c620cedd6eb6023548dca2d026cf (diff)
Generate patch with git diff instead of git format-patch
This will generate a patch: - that is smaller - that applies more cleanly since only the final diff will be applied instead of each commit's diff Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/gitlab/ee_compat_check.rb')
-rw-r--r--lib/gitlab/ee_compat_check.rb10
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