From 956056db37c6d1ff0ba17746f81f83729c0fbb6b Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 8 Apr 2021 12:04:25 +0900 Subject: [PATCH] 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. --- tool/sync_default_gems.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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