Git has now support for sparse checkout. Testing done by Nirbheek Chauhan concluded: > Note that this doesn't satisfy half the use of sparse trees; i.e. > quickly fetch only a subdirectory; make changes; push. However, I > suspect that would be extremely difficult to implement given git's > architecture. http://archives.gentoo.org/gentoo-scm/msg_2aa0d03b82f78b45913e645337d7d4e0.xml
I think an alternate solution would be to support using the complete git checkout as /usr/portage. We'd have to rsync the caches and remaining files like herds.xml and use.local.desc then.
Confirmed to work with git-9999-r2 (next branch) as of 2014/02/22 $ git config core.sparsecheckout true $ echo profiles > .git/info/sparse-checkout $ echo metadata >> .git/info/sparse-checkout $ git read-tree -m -u HEAD $ ls metadata profiles