I'm closer to my requirement. I have found gitweb simply provide a GUI for
and code comparison. And the git itself is good enough to do the ACL stuff with
I already have the following code to deploy the push into its work-tree
while read oldrev newrev ref
branch=`echo $ref | cut -d/ -f3`
if [ "master" == "$branch" ]; then
git --work-tree=/path/under/root/dir/live-site/ checkout -f $branch
echo 'Changes pushed live.'
if [ "dev" == "$branch" ]; then
git --work-tree=/path/under/root/dir/dev-site/ checkout -f $branch
echo 'Changes pushed to dev.'
This code can be extended for as many branches as you have.
I now need a mechanism to restrict the user to it's own branch so that user
can't push into
any other branch in mistake.
Say I have
master branch -> only admin user can push here.
dev branch -> only user dev1 , dev2 and master can push here.
testing branch -> only user test1 and test2 can push here.
I think this can also be done with pre-receive hook. Any suggestion on the hook
welcome. Also this can be implemented on the above hook or in a separate hook.
A separate hook is better due to maintainability and then I need to call
pre-receive hook. Please suggest.
On 18-Mar-2013, at 11:14 AM, Joydeep Bakshi <joydeep.bak...@infoservices.in>
> On 15-Mar-2013, at 6:44 PM, Magnus Bäck <ba...@google.com> wrote:
>> Right, but that's R/W permissions. Almost any piece of Git hosting
>> software supports restriction of pushes. Discriminating *read* access
>> between developers and maintenance people sounds like a disaster if it's
>> the same organisation.
> Just restriction on push access is what required.
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html