зеркало из https://github.com/github/ruby.git
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:
Родитель
36bad6f14f
Коммит
f7faac13c6
|
@ -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?
|
||||
|
|
Загрузка…
Ссылка в новой задаче