diff options
-rw-r--r-- | tool/sync_default_gems.rb | 2 |
1 files changed, 2 insertions, 0 deletions
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? |