summaryrefslogtreecommitdiff
path: root/tool/sync_default_gems.rb
diff options
context:
space:
mode:
authorKevin Newton <kddnewton@gmail.com>2023-08-21 12:07:19 -0400
committerKevin Newton <kddnewton@gmail.com>2023-08-21 12:20:07 -0400
commit0c61406319802576a9b1c3e14802fc5eb9b8f803 (patch)
tree2456568e7db86020bbf8645d973b8a6b797cd770 /tool/sync_default_gems.rb
parent86ac17efde6cf98903513cac2538b15fc4ac80b2 (diff)
Fix YARP sync
Diffstat (limited to 'tool/sync_default_gems.rb')
-rwxr-xr-xtool/sync_default_gems.rb8
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}