一个看起来接近你想要的 Gitolite 功能是“个人分支”
“个人”分支非常适合开发人员需要共享工作但不能直接相互拉取的环境(通常是由于网络或身份验证相关的原因,这在公司设置中都很常见)。
个人分支存在于它们自己的命名空间中。语法是
RW+ personal/USER/ = @userlist
where the "personal" can be anything you like (but cannot be empty), and the "/USER/
" part is necessary (including both slashes).
A user "alice
" (if she's in the userlist) can then push any branches inside personal/alice/
.
Which means she can push personal/alice/foo
and personal/alice/bar
, but NOT personal/alice
.
(Background: at runtime the "USER
" component will be replaced by the name of the invoking user. Access is determined by the right hand side, as usual).
That means, when you are looking for "Is there a macro that would expand to the users name?", /USER/
would be an example of a "macro" expended to the username.