Using the permission field

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 ...

Get Gitolite Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.