From 2dffd365048d48e4d8da8bd77a023f87d7266e9f Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sun, 17 Sep 2023 21:11:54 +0900 Subject: [PATCH] Move special patterns to the common pattern --- tool/sync_default_gems.rb | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb index a931f86227..6ddb11b63c 100755 --- a/tool/sync_default_gems.rb +++ b/tool/sync_default_gems.rb @@ -434,15 +434,12 @@ module SyncDefaultGems # Common patterns patterns << %r[\A(?: - [A-Z]\w*\.(?:md|txt) - |[^/]+\.yml + [^/]+ # top-level entries |\.git.* - |[A-Z]\w+file - |COPYING - |Gemfile.lock |bin/.* |rakelib/.* - |test/lib/.* + |test/(?:lib|fixtures)/.* + |tool/.* )\z]mx # Gem-specific patterns @@ -570,11 +567,6 @@ module SyncDefaultGems } # Remove any new top-level directories. true - when !f.include?("/"), - f.start_with?("test/fixtures/", "test/lib/", "tool/") - # Forcibly reset any top-level entries, and any changes under - # /test/fixtures, /test/lib, or /tool. - ignore << f when ignore_file_pattern.match?(f) # Forcibly reset any changes matching ignore_file_pattern. ignore << f