Summary: is it possible to easily mirror a remote branch while also applying a transformation to it?
Detail: The official Arch package repo holds configuration in a folder per package:
https://github.com/archlinux/svntogit-community/tree/master/a2jmidid/trunk
It is also set up to have a branch per package which seems to point to the same place:
https://github.com/archlinux/svntogit-community/tree/packages/a2jmidid/trunk
As the repo is quite large and I'm only interested in specific packages, I'm looking for a way to track specific parts of the repo, in order to fork further. I'm also just interested in the trunk folder.
Ideally I want to end up with a repo for the above that can be accessed with:
Git://localserver/packages/a2jmidid.git
Where cloning the above ends up with the contents of the trunk folder (and related history) of the specific package.
I have used --mirror for similar before, but only for full repos and their many branches. I suspect it's worth leveraging the package branch (vs the folder in master), but I can't see how to mirror just a single branch. That also wouldn't reduce the repo to just the trunk folder.
I've tried just cloning and copying the files I'm interested in, but that doesn't persist the history.
I think the approach should be to clone, branch and delete/move the files around, and then in future pull/merge and commit, but I'm having trouble nailing the exact workflow. The intention is to schedule this update.