diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-08-30 15:04:38 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-08-31 10:30:35 +0900 |
commit | dc911a47cee378d1e495c61ec3e6dc24995bdf8e (patch) | |
tree | 154a404109ce14fedf135f1adb41e09bd0ac36eb /tool | |
parent | 0aa404b9573d028d87072f40ecb9b86dc161b7ef (diff) |
sync_default_gems.rb: Move ignored_paths to ignore_file_pattern_for
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/8329
Diffstat (limited to 'tool')
-rwxr-xr-x | tool/sync_default_gems.rb | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb index 78d9f1b5a2..a54bd15e1f 100755 --- a/tool/sync_default_gems.rb +++ b/tool/sync_default_gems.rb @@ -447,10 +447,19 @@ module SyncDefaultGems # Gem-specific patterns case gem + when "rubygems" + # We don't copy any vcr_cassettes to this repository. Because the directory does not + # exist, rename detection doesn't work. So it starts with the original path `bundler/`. + %r[\A(?: + bundler/spec/support/artifice/vcr_cassettes + )\z]mx when "yarp" + # Rename detection never works between ruby/ruby/doc and ruby/yarp/docs + # since ruby/ruby/doc is not something owned by YARP. %r[\A(?: Makefile\.in |configure\.ac + |docs/.* |fuzz/.* |rust/.* |tasks/.* @@ -527,27 +536,6 @@ module SyncDefaultGems #++ def resolve_conflicts(gem, sha, edit) - # Forcibly remove any files that we don't want to copy to this repository. - # We also ignore them as new `toplevels` even when they don't conflict. - ignored_paths = [] - case gem - when "rubygems" - # We don't copy any vcr_cassettes to this repository. Because the directory does not - # exist, rename detection doesn't work. So it starts with the original path `bundler/`. - ignored_paths += %w[bundler/spec/support/artifice/vcr_cassettes] - when "yarp" - # Rename detection never works between ruby/ruby/doc and ruby/yarp/docs - # since ruby/ruby/doc is not something owned by YARP. - ignored_paths += %w[docs/] - end - ignored_paths.each do |path| - if File.exist?(path) - puts "Removing: #{path}" - system("git", "reset", path) - rm_rf(path) - end - end - # git has inexact rename detection, so they follow directory renames even for new files. # However, new files are considered a `CONFLICT (file location)`, so you need to git-add them here. # We hope that they are not other kinds of conflicts, assuming we don't modify them in this repository. |