From f7faac13c6f7776cbdc20d8f59e33d26e30b93d0 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sun, 28 Mar 2021 23:39:27 +0900 Subject: sync_default_gems.rb: remove un-committed files [ci skip] As files non-existing in the repository cannot be checked out, remove files to be ignored once, and re-check the status. --- tool/sync_default_gems.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb index 540a052d24..5b64c83f8c 100644 --- a/tool/sync_default_gems.rb +++ b/tool/sync_default_gems.rb @@ -436,6 +436,8 @@ def sync_default_gems_with_commits(gem, ranges, edit: nil) ignore, conflict = result.partition {|name| IGNORE_FILE_PATTERN =~ name} unless ignore.empty? system(*%W"git reset HEAD --", *ignore) + File.unlink(*ignore) + ignore = IO.popen(%W"git status --porcelain" + ignore, &:readlines).map! {|line| line[/^.. (.*)/, 1]} system(*%W"git checkout HEAD --", *ignore) end unless conflict.empty? -- cgit v1.2.3