[前][次][番号順一覧][スレッド一覧]

ruby-changes:71753

From: Nobuyoshi <ko1@a...>
Date: Sat, 16 Apr 2022 16:47:06 +0900 (JST)
Subject: [ruby-changes:71753] 492185e39c (master): Do not import any files under rakelib

https://git.ruby-lang.org/ruby.git/commit/?id=492185e39c

From 492185e39c0edec8461502fc30f607ea2f035a5e Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Sat, 16 Apr 2022 16:26:46 +0900
Subject: Do not import any files under rakelib

---
 tool/sync_default_gems.rb | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb
index 564877a26b..56279ead0e 100755
--- a/tool/sync_default_gems.rb
+++ b/tool/sync_default_gems.rb
@@ -375,8 +375,8 @@ IGNORE_FILE_PATTERN = https://github.com/ruby/ruby/blob/trunk/tool/sync_default_gems.rb#L375
   |\.git.*
   |[A-Z]\w+file
   |COPYING
-  |rakelib\/
-  )\z/x
+  |rakelib\/.*
+  )\z/mx
 
 def message_filter(repo, sha)
   log = STDIN.read
@@ -424,7 +424,9 @@ def sync_default_gems_with_commits(gem, ranges, edit: nil) https://github.com/ruby/ruby/blob/trunk/tool/sync_default_gems.rb#L424
 
   # Ignore Merge commit and insufficiency commit for ruby core repository.
   commits.delete_if do |sha, subject|
-    files = IO.popen(%W"git diff-tree --no-commit-id --name-only -r #{sha}", &:readlines)
+    files = IO.popen(%W"git diff-tree -z --no-commit-id --name-only -r #{sha}") {|f|
+      f.readlines("\0", chomp: true)
+    }
     subject =~ /^Merge/ || subject =~ /^Auto Merge/ || files.all?{|file| file =~ IGNORE_FILE_PATTERN}
   end
 
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]