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

Migrating update hooks


Some sites may already have been using update hooks in their existing (pre-Gitolite) repository setups. Since Gitolite reserves the update hook for itself, this presents a bit of a problem in terms of switching over.

If your site has such update hooks, the VREF mechanism can help replace them. Replacing update hooks is one of the simplest uses of VREFs, but understanding how that is done is also a good first step to understanding the full power of Gitolite's VREF mechanism.

To convert your existing update hooks to VREFs, you first create a directory called VREF within $HOME/local (we're continuing the convention from Chapter 9, Customizing Gitolite, that the LOCAL_CODE variable in the rc file points here). Then, copy each unique update hook into this newly created directory, renaming each update hook in some way.

As an example, say you had one repository that was frequently worked on by novice users using Windows, and so the update hook was used to make sure there were...