diff --git a/bin/framework-pull-upstream.sh b/bin/framework-pull-upstream.sh index 74f777951..2cb66b3a1 100755 --- a/bin/framework-pull-upstream.sh +++ b/bin/framework-pull-upstream.sh @@ -423,6 +423,18 @@ if [ "$ALREADY_UP_TO_DATE" = false ]; then exit 1 fi echo " ✓ Framework updated (./rsx preserved by .gitattributes)" + + # Remove files that were deleted upstream (git merge doesn't auto-delete) + echo " → Cleaning up deleted files..." + DELETED_FILES=$(git diff --name-only --diff-filter=D HEAD~1 HEAD -- rsx/ 2>/dev/null || true) + if [ -n "$DELETED_FILES" ]; then + echo "$DELETED_FILES" | while read -r file; do + if [ -f "$file" ]; then + rm -f "$file" + echo " Removed: $file" + fi + done + fi else # Framework mode: fast-forward only (updates everything including ./rsx) MERGE_OUTPUT=$(git merge --ff-only "$UPSTREAM_BRANCH" 2>&1) || {