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
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Repository wildcards


A repository wildcard is a regular expression that describes a whole range of possible repository names. For example, the line repo dev/alice/[a-z].* represents all repositories whose names start with dev/alice/, followed by an alphabetic character, followed optionally by anything else. The repository dev/alice/foo would qualify, but dev/alice/123 would not, nor would just dev/alice.

Tip

Due to the need to properly represent repositories such as gtk+ and c++, if the + character is the only regular expression metacharacter in the repo name, it will be taken to be a normal repository, not a repository wildcard. To specify foo.+, you should instead say foo..*. You can also say [f]oo.+—the presence of the bracket tells Gitolite it is a regular expression.

Gitolite allows repo lines to use wildcards instead of individual repository names. This gives us the next step to our solution; we can now write:

repo dev/alice/[a-z].*
    RW+       =  alice
    RW        =  bob
    R   ...