Book Image

Gitolite Essentials

By : Sitaram Chamarty
Book Image

Gitolite Essentials

By: Sitaram Chamarty

Overview of this book

Table of Contents (19 chapters)
Gitolite Essentials
About the Author
About the Reviewers

Understanding VREFs

The previous chapter introduced us to the concept of a refex, which is a regular expression that is used to match the ref being pushed. This allows us to make decisions on allowing or rejecting the push based on the name of the ref (branch or tag) being pushed.

However, we might have other criteria for deciding whether to allow or deny the push. The most common example is whether specific files have been changed, and if they have, to disallow the push.

A VREF is a special kind of refex; the "V" stands for "Virtual". This is a refex that will not match the ref that Git knows about (which is a branch name or a tag name). Rather, it will attempt to match against some other characteristic of the commit or series of commits being pushed.

Here's an example. Let's say you are running a project where the build system, and in particular the Makefile, is a rather critical component and has been finely tuned to play nicely with all the environments for which your product is built and...