sync_default_gems.rb: do not reset the whole directory [ci skip]
If no files to be ignored, resetting with no argument means resetting the whole directory.
This commit is contained in:
parent
cdc0cdc77f
commit
956056db37
@ -439,7 +439,7 @@ def sync_default_gems_with_commits(gem, ranges, edit: nil)
|
|||||||
system(*%W"git reset HEAD --", *ignore)
|
system(*%W"git reset HEAD --", *ignore)
|
||||||
File.unlink(*ignore)
|
File.unlink(*ignore)
|
||||||
ignore = IO.popen(%W"git status --porcelain" + ignore, &:readlines).map! {|line| line[/^.. (.*)/, 1]}
|
ignore = IO.popen(%W"git status --porcelain" + ignore, &:readlines).map! {|line| line[/^.. (.*)/, 1]}
|
||||||
system(*%W"git checkout HEAD --", *ignore)
|
system(*%W"git checkout HEAD --", *ignore) unless ignore.empty?
|
||||||
end
|
end
|
||||||
unless conflict.empty?
|
unless conflict.empty?
|
||||||
if edit
|
if edit
|
||||||
|
Loading…
x
Reference in New Issue
Block a user