We have a situation at work where for security concerns, we want to grant a set of employees access to only a subset of a monolithic git repo. We investigated using subtrees, but it requires a little more manual intervention than we'd like.
So now I'm working on a project to write a single binary that can installed as a server-side git hook which would publish a subdirectory as its own repo, and then syncs commits and branches between the two.
Of course, it's not perfect. It won't be able to handle signed commits or tags. And the repository have to be on the same box (it uses symlinks, but that could in theory be worked around at the cost of a more complex setup script )
But it should be completely transparent to the repository users.
Oh, that does look cool. I can see how that would be pretty useful, but it does look like it's a manual process that needs to be triggered, and not automatic. Still, it looks to be more widely applicable than what I'm building.
So now I'm working on a project to write a single binary that can installed as a server-side git hook which would publish a subdirectory as its own repo, and then syncs commits and branches between the two.
Of course, it's not perfect. It won't be able to handle signed commits or tags. And the repository have to be on the same box (it uses symlinks, but that could in theory be worked around at the cost of a more complex setup script )
But it should be completely transparent to the repository users.