From ecd42cfe39c13636defd4138cdbe92c709978812 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 29 Apr 2023 10:40:39 +0900 Subject: Skip added tool files Get rid of accidents like 966f0d91e2a86fa1347cdafbe1af47e7350aa4ca. --- tool/sync_default_gems.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tool') diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb index 467063b968..4bd6bf6802 100755 --- a/tool/sync_default_gems.rb +++ b/tool/sync_default_gems.rb @@ -435,7 +435,8 @@ module SyncDefaultGems |\.git.* |[A-Z]\w+file |COPYING - |rakelib\/.* + |\Arakelib\/.* + |\Atest\/lib\/.* )\z/mx def message_filter(repo, sha, input: ARGF) @@ -583,8 +584,9 @@ module SyncDefaultGems next end - tools = pipe_readlines(%W"git diff --name-only -z HEAD~..HEAD -- test/lib/ tool/") + tools = pipe_readlines(%W"git diff --name-only -z HEAD~..HEAD -- test/lib/ tool/ rakelib/") unless tools.empty? + system(*%W"git rm --", *tools) system(*%W"git checkout HEAD~ --", *tools) if system(*%W"git diff --quiet HEAD~") `git reset HEAD~ --` && `git checkout .` && `git clean -fd` -- cgit v1.2.1