mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Improve the commits list for cherry-picking from default gems.
* Ignore Merge commit from the commit lists before trying to pick commit. * Show the commits list at first.
This commit is contained in:
parent
348c9687bf
commit
071bf88970
1 changed files with 7 additions and 4 deletions
|
@ -240,12 +240,15 @@ def sync_default_gems_with_commits(gem, range)
|
|||
|
||||
IO.popen(%W"git log --format=%H,%s #{range}") do |f|
|
||||
commits = f.read.split("\n").reverse.map{|commit| commit.split(',')}
|
||||
|
||||
# Ignore Merge commit for ruby core repository.
|
||||
commits.delete_if{|_, subject| subject =~ /^Merge/}
|
||||
|
||||
puts "Try to pick these commits:"
|
||||
puts commits.map{|commit| commit.join(": ")}.join("\n")
|
||||
|
||||
commits.each do |sha, subject|
|
||||
puts "Pick #{sha} from #{$repositories[gem.to_sym]}."
|
||||
if subject =~ /^Merge/
|
||||
puts "Skip #{sha}. Because It was merge commit"
|
||||
next
|
||||
end
|
||||
|
||||
`git cherry-pick #{sha}`
|
||||
unless $?.success?
|
||||
|
|
Loading…
Add table
Reference in a new issue