Skip to content

Commit

Permalink
allow 'D' for @ALL repos
Browse files Browse the repository at this point in the history
...so that the new semantics can be made system-default if someone wants
to do that
  • Loading branch information
sitaramc committed Mar 31, 2010
1 parent 967af2c commit 5aba13c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions doc/3-faq-tips-etc.mkd
Expand Up @@ -387,6 +387,19 @@ This provides the *greatest* backward compatibility (if you don't specify any
`D` permissions, everything works just as before), while also enabling the new
semantics at the granularity of a repo, instead of the entire config.

Note 1: if you find that `RW+` no longer allows deletion but you can't see a
`D` permission in the rules, remember that gitolite allows a repo config to be
specified in multiple places for convenience, included delegated or included
files. Be sure to search everywhere :)

Note 2: a quick way to make this the default for *all* your repos is:

repo @all
D dummy-branch = foo

where foo can be either the administrator, or if you can ignore the warning
message when you push, a non-existant user.

[sdrr]: http://groups.google.com/group/gitolite/browse_thread/thread/9f2b4358ce406d4c#

#### file/dir NAME based restrictions
Expand Down
2 changes: 1 addition & 1 deletion hooks/common/update
Expand Up @@ -77,7 +77,7 @@ $perm = '+' if $oldsha ne $merge_base;

# were any 'D' perms specified? If they were, it means we have to separate
# deletes from rewinds, so if the new sha is all 0's, change the '+' to a 'D'
$perm = 'D' if $repos{$ENV{GL_REPO}}{DELETE_IS_D} and $newsha eq '0' x 40;
$perm = 'D' if ( $repos{$ENV{GL_REPO}}{DELETE_IS_D} or $repos{'@all'}{DELETE_IS_D} ) and $newsha eq '0' x 40;

my @allowed_refs;
# @all repos: see comments in similar code in check_access
Expand Down

0 comments on commit 5aba13c

Please sign in to comment.