On Sat, Aug 2, 2014 at 4:45 PM, Branko Čibej <br...@wandisco.com> wrote:

>  On 02.08.2014 15:20, Alan Barrett wrote:
>
> On Tue, 29 Jul 2014, C. Michael Pilato wrote:
>
> This leaves open the possibility of a future additional match mode for
> regular expressions (using the '^:' magic prefix) should we seek to "go
> there".
>
>  # Match the trunk and branches subdirs and their children.
>  [repos:^:^/(trunk|branches)(/.*|$)$]
>
>
> As a user, I'd prefer to see keywords rather than unusual characters to
> designate special syntax.  For example, I would prefer
> [glob:/tags/*/private] and [regex:/tags/.*/private] to [*:/tags/*/private]
> and [^:/tags/.*/private].
>
>
> Quite understood. Unfortunately, the syntax you propose above cannot work;
> [thing:/path] is already a valid syntax, and if we did what you propose,
> we'd no longer be able to create rules for repositories named "glob" and
> "regex". Worse, this could change the meaning of existing authz files.
>
> We could do something like this, though:
>
>     [:glob:/path]
>     [:glob:repos:/path]
>
> In the old authz files, these rules would be invalid, because the
> repository name part (the substring up to the first colon) cannot be empty.
>
> Thoughts?
>

+1. Wouldn't win a beauty award but ticks all the right boxes for me:

* No collision with existing valid rules.
* Would be rejected as invalid by old code.
* Allows for any number of types to be invented later.
* Robust as the type is specified with the contents and has only local
scope.

-- Stefan^2.

Reply via email to