diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-04-20 21:13:08 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-04-20 21:14:04 +0900 |
commit | e571bb8436502b1bce54a1e41c40ef682e05c555 (patch) | |
tree | a670cd9710568fe25cc44e0770298e8b52bc1c0f /tool | |
parent | b4c9b570f1a16ac33a67eabc1ca70db36d33178c (diff) |
Removed phony atomic operations for void* and VALUE
Diffstat (limited to 'tool')
-rw-r--r-- | tool/sync_default_gems.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb index d034e723a4..ddbce8da7b 100644 --- a/tool/sync_default_gems.rb +++ b/tool/sync_default_gems.rb @@ -374,11 +374,15 @@ def sync_default_gems_with_commits(gem, range) if result.empty? skipped = true - elsif result.start_with?("CONFLICT") + elsif /^CONFLICT/ =~ result result = IO.popen(%W"git status --porcelain", &:readlines).each(&:chomp!) - ignore = result.map {|line| /^DU / =~ line and IGNORE_FILE_PATTERN =~ (name = $') and name} + ignore = result.map {|line| /^.U / =~ line and IGNORE_FILE_PATTERN =~ (name = $') and name} ignore.compact! - system(*%W"git reset", *ignore) unless ignore.empty? + warn "Resetting #{ignore}" + unless ignore.empty? + system(*%W"git reset HEAD --", *ignore) + system(*%W"git checkout HEAD --", *ignore) + end skipped = !system({"GIT_EDITOR"=>"true"}, *%W"git cherry-pick --no-edit --continue") end |