diff options
author | Kevin Newton <kddnewton@gmail.com> | 2023-08-21 12:07:19 -0400 |
---|---|---|
committer | Kevin Newton <kddnewton@gmail.com> | 2023-08-21 12:20:07 -0400 |
commit | 0c61406319802576a9b1c3e14802fc5eb9b8f803 (patch) | |
tree | 2456568e7db86020bbf8645d973b8a6b797cd770 /tool | |
parent | 86ac17efde6cf98903513cac2538b15fc4ac80b2 (diff) | |
download | ruby-0c61406319802576a9b1c3e14802fc5eb9b8f803.tar.gz |
Fix YARP sync
Diffstat (limited to 'tool')
-rwxr-xr-x | tool/sync_default_gems.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb index 242bbc07f2..e4e259e6f6 100755 --- a/tool/sync_default_gems.rb +++ b/tool/sync_default_gems.rb @@ -604,6 +604,14 @@ module SyncDefaultGems # UA: unmerged, added by them # AA: unmerged, both added unmerged = pipe_readlines(%W"git status --porcelain -z") + + # For YARP, we want to handle DD: deleted by both. + if gem == "yarp" + deleted = unmerged.grep(/^DD /) + deleted.map! { |line| line.delete_prefix("DD ") } + system(*%W"git rm -f --", *deleted) unless deleted.empty? + end + unmerged.map! {|line| line[/\A(?:.U|[UA]A) (.*)/, 1]} unmerged.compact! ignore, conflict = unmerged.partition {|name| ignore_file_pattern =~ name} |