зеркало из https://github.com/github/ruby.git
Use 3 way merge for merger.rb
Since --3way insists --index, git diff needs to compare with HEAD.
This commit is contained in:
Родитель
d766d5346b
Коммит
9891797a27
|
@ -204,7 +204,7 @@ class << Merger
|
|||
if svn_mode?
|
||||
command = %w[svn diff --diff-cmd=diff -x -upw]
|
||||
else
|
||||
command = %w[git diff --color]
|
||||
command = %w[git diff --color HEAD]
|
||||
end
|
||||
IO.popen(command + [file].compact, &:read)
|
||||
end
|
||||
|
@ -325,7 +325,7 @@ else
|
|||
|
||||
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'], 'wb') { |f| f.write(patch) }
|
||||
IO.popen(['git', 'apply', '--3way'], '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}"
|
||||
|
|
Загрузка…
Ссылка в новой задаче