summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-04-20 21:21:42 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-04-20 21:26:55 +0900
commitaeb9d11594750eec085af60d6bee1ed86dd14686 (patch)
treef383700f195a235571a00bba6618595e7417d4c3 /tool
parente571bb8436502b1bce54a1e41c40ef682e05c555 (diff)
Revert irrelevant change [ci skip]
Diffstat (limited to 'tool')
-rw-r--r--tool/sync_default_gems.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb
index ddbce8da7b..d034e723a4 100644
--- a/tool/sync_default_gems.rb
+++ b/tool/sync_default_gems.rb
@@ -374,15 +374,11 @@ def sync_default_gems_with_commits(gem, range)
if result.empty?
skipped = true
- elsif /^CONFLICT/ =~ result
+ elsif result.start_with?("CONFLICT")
result = IO.popen(%W"git status --porcelain", &:readlines).each(&:chomp!)
- ignore = result.map {|line| /^.U / =~ line and IGNORE_FILE_PATTERN =~ (name = $') and name}
+ ignore = result.map {|line| /^DU / =~ line and IGNORE_FILE_PATTERN =~ (name = $') and name}
ignore.compact!
- warn "Resetting #{ignore}"
- unless ignore.empty?
- system(*%W"git reset HEAD --", *ignore)
- system(*%W"git checkout HEAD --", *ignore)
- end
+ system(*%W"git reset", *ignore) unless ignore.empty?
skipped = !system({"GIT_EDITOR"=>"true"}, *%W"git cherry-pick --no-edit --continue")
end