summaryrefslogtreecommitdiff
path: root/tool/sync_default_gems.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-04-08 12:04:25 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-04-08 12:04:25 +0900
commit956056db37c6d1ff0ba17746f81f83729c0fbb6b (patch)
tree4fc07480cb1ce69a498509bde1b861a1713c4587 /tool/sync_default_gems.rb
parentcdc0cdc77f51462b466c627efda0ec4344155c22 (diff)
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.
Diffstat (limited to 'tool/sync_default_gems.rb')
-rw-r--r--tool/sync_default_gems.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb
index 69ddab6899..e10efae0a1 100644
--- a/tool/sync_default_gems.rb
+++ b/tool/sync_default_gems.rb
@@ -439,7 +439,7 @@ def sync_default_gems_with_commits(gem, ranges, edit: nil)
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)
+ system(*%W"git checkout HEAD --", *ignore) unless ignore.empty?
end
unless conflict.empty?
if edit