Skip to content

Commit 956056d

Browse files
committed
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.
1 parent cdc0cdc commit 956056d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tool/sync_default_gems.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ def sync_default_gems_with_commits(gem, ranges, edit: nil)
439439
system(*%W"git reset HEAD --", *ignore)
440440
File.unlink(*ignore)
441441
ignore = IO.popen(%W"git status --porcelain" + ignore, &:readlines).map! {|line| line[/^.. (.*)/, 1]}
442-
system(*%W"git checkout HEAD --", *ignore)
442+
system(*%W"git checkout HEAD --", *ignore) unless ignore.empty?
443443
end
444444
unless conflict.empty?
445445
if edit

0 commit comments

Comments
 (0)