mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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.
This commit is contained in:
parent
36bad6f14f
commit
f7faac13c6
1 changed files with 2 additions and 0 deletions
|
@ -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?
|
||||
|
|
Loading…
Reference in a new issue