Split Git Repo into individual components.
N/A
All developers.
From dev mailing list:
Going to try to sum up what I think is forming as a consensus.
And the last time I chatted with Nils about composer it didn't have support for the installation of web assets - so for Horde the result would be a mixture of using composer and PEAR package definitions. I have no clue how much work it would be to get composer on par with PEAR in that area. Nils suggested that this should not be too hard. But the components helper we have should also be capable of managing PEAR and composer package definitions in parallel.
I would assume we would do something like maintain package.xml files and then use the components script to create a composer.json file. We could probably leverage this code:
https://github.com/claylo/conductor
BTW, adding yet another advantage to separate repositories: this greatly simplifies/improves continuous integration reporting. Not only does this drastically take the time to check a commit, it more directly targets the actual changes the commit made.
As far as splitting the repo, I can verify the following process works. It is necessary to do ALL the steps - git filter-branch is not enough as it leaves the Git repo still containing all the old references (i.e. the Git repo is still 150 MB).
# This command is best done on the same machine as a copy of the Horde repo, to cut down on network usage git clone --bare [repo] [newrepo] cd [newrepo] git remote rm origin # Replace "XXX" with the prefix of the tags YOU WANT TO KEEP (all other tags will be removed) git tag -l | awk '\!/^(XXX-.*)$/ {print $1}' | xargs git tag -d # Replace XXX with the pathname of the Horde application/framework library git filter-branch --prune-empty --subdirectory-filter XXX --tag-name-filter cat -- --all git update-ref -d refs/original/refs/heads/master git reflog expire --expire=now --all git gc --aggressive --prune=now # At this point, the git pack is still humongous (150MB). These steps are necessary to trim the fat: cd .. # file:// is necessary! Hardlinking won't work! git clone --bare file://[newrepo] [newrepo2] # newrepo2 now contains the trimmed, bare version of the git repo (a couple of MB vs. ~150 MB)
...
Back to the Project List