MOON
Server: Apache
System: Linux nserver.cafsindia.com 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: cafsindia (1002)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: /home/cafsindia/lead_cafsinfotech.com/vendor/api-platform/core/subtree.sh
#!/bin/bash

set -xe

# Subtree split on tag this script gets called using find:
# find src -maxdepth 2 -name composer.json -print0 | xargs -I '{}' -n 1 -0 bash subtree.sh {} refs/tags/3.1.5
# find src -maxdepth 2 -name composer.json -print0 | xargs -I '{}' -n 1 -0 bash subtree.sh {} refs/heads/3.1
# See the subtree workflow
package=$(jq -r .name $1)
directory=$(dirname $1)
repository="https://github.com/$package"
git remote add $package $repository
sha=$(splitsh-lite --prefix=$directory)
git push $package $sha:$2