diff --git a/doc/3-faq-tips-etc.mkd b/doc/3-faq-tips-etc.mkd index 982db8f..5939832 100644 --- a/doc/3-faq-tips-etc.mkd +++ b/doc/3-faq-tips-etc.mkd @@ -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 diff --git a/hooks/common/update b/hooks/common/update index e1b1209..3f85c2b 100755 --- a/hooks/common/update +++ b/hooks/common/update @@ -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