Let us say we have several different kinds of source code files, and listing all of them in the rule for the technical writer is not only cumbersome, but error prone because we might miss something. We do know, however, that technical writers only work on documents, so we'd prefer to simply restrict them to *.odt
files.
Until now, we have considered the NAME
VREF to behave in a certain way: receive a filename pattern, and if any file has been changed (in the push) that matches that pattern, exit with a non-zero return code to signal Gitolite to reject the push. As you can see, this behavior completely ignores the permission field; that is, even this rule would have the same effect:
RW+ VREF/NAME/.*\.[ch]$ = @tech-writers
What we need is a way to consider the permission field as well. Our first impulse might be to develop some way to pass this field to the VREF code, perhaps with some new syntax, and let the VREF code reverse the check when required.
However...