ruby-changes:56493
From: Hiroshi <ko1@a...>
Date: Sun, 14 Jul 2019 22:11:00 +0900 (JST)
Subject: [ruby-changes:56493] Hiroshi SHIBATA: c8e1be6f1f (master): Skip merge commit with rubygems and bundler.
https://git.ruby-lang.org/ruby.git/commit/?id=c8e1be6f1f From c8e1be6f1fed7f4f54d5ac1f7ae1ebe2c0f60dbe Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA <hsbt@r...> Date: Sun, 14 Jul 2019 17:53:14 +0900 Subject: Skip merge commit with rubygems and bundler. diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb index 7f5e597..5c9ee9a 100644 --- a/tool/sync_default_gems.rb +++ b/tool/sync_default_gems.rb @@ -238,12 +238,18 @@ def sync_default_gems_with_commits(gem, range) https://github.com/ruby/ruby/blob/trunk/tool/sync_default_gems.rb#L238 end end - IO.popen(%W"git log --format=%H #{range}") do |commits| - commits.read.split.reverse.each do |commit| - puts "Pick #{commit} from #{$repositories[gem.to_sym]}." - `git cherry-pick #{commit}` + IO.popen(%W"git log --format=%H,%s #{range}") do |f| + commits = f.read.split("\n").reverse.map{|commit| commit.split(',')} + 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? - puts "Failed to pick #{commit}." + puts "Failed to pick #{sha}" break end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/