ruby-changes:57172
From: NAKAMURA <ko1@a...>
Date: Mon, 19 Aug 2019 15:38:33 +0900 (JST)
Subject: [ruby-changes:57172] NAKAMURA Usaku: 4515bcc922 (master): Omit version.h when merging
https://git.ruby-lang.org/ruby.git/commit/?id=4515bcc922 From 4515bcc922376771c56733745c7595e14449b6d8 Mon Sep 17 00:00:00 2001 From: NAKAMURA Usaku <usa@r...> Date: Mon, 19 Aug 2019 15:37:28 +0900 Subject: Omit version.h when merging diff --git a/tool/merger.rb b/tool/merger.rb index 7405948..228faef 100755 --- a/tool/merger.rb +++ b/tool/merger.rb @@ -316,11 +316,11 @@ else https://github.com/ruby/ruby/blob/trunk/tool/merger.rb#L316 if resp.code != '200' abort "'#{git_uri}' returned status '#{resp.code}':\n#{resp.body}" end - patch = resp.body + patch = resp.body.sub(/^diff --git a\/version\.h b\/version\.h\nindex .*\n--- a\/version\.h\n\+\+\+ b\/version\.h\n@@ .* @@\n(?:[-\+ ].*\n|\n)+/, '') message = "\n\n#{(patch[/^Subject: (.*)\n\ndiff --git/m, 1] || "Message not found for revision: #{git_rev}\n")}" puts '+ git apply' - IO.popen(['git', 'apply'], 'w') { |f| f.write(patch) } + IO.popen(['git', 'apply'], 'wb') { |f| f.write(patch) } else default_merge_branch = (%r{^URL: .*/branches/ruby_1_8_} =~ `svn info` ? 'branches/ruby_1_8' : 'trunk') svn_src = "#{Merger::REPOS}#{ARGV[1] || default_merge_branch}" -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/