Subject: Re: Does git have "Path-Based Authorization"?

From: Jakub Narebski <[email-masked]>
Date: Sat, 01 Oct 2011 06:06:19 -0700 (PDT)

Grant <[email-masked]> writes:

> Hello, I'm trying to decide between git and subversion.  Subversion
> has "Path-Based Authorization" so I can give a developer access to
> only specific files instead of everything.  Does git have something
> similar?
> 
> http://svnbook.red-bean.com/en/1.5/svn.serverconfig.pathbasedauthz.html
 
In distributed version control systems each developers gets full copy
(a clone) of a repository (separate repository instance).  This means that
if you want for developer to see only specified subset of repository
(specific subdirectories) you would have to split repository into
submodules, and control access on (sub)repository basis.

However if you want only to prevent developer from making changes outside
specific subdirectory or specified files, you can do that on publish time
via update / pre-receive hook (like contrib/hooks/update-paranoid), or git
repository management tool such as Gitolite.  That would prevent a push if
any of commits being published touches files that it shouldn't.

P.S. Karl Fogel in "Producing Open Source Software" (http://producingoss.com)
writes that social solutions wrt. restricting contributors to given area
are better than technical solutions such as (overly-)strict access
control.

HTH
-- 
Jakub Narębski