added support for a post-repo-create hook (gl-post-init)
...some people want to run a special function after a repo is created
This commit is contained in:
parent
c18514e213
commit
67a72a3f5b
3 changed files with 91 additions and 68 deletions
|
@ -294,6 +294,12 @@ sub new_repo
|
|||
# override with the package hooks
|
||||
ln_sf("$GL_PACKAGE_HOOKS/common", "*", "hooks") if $GL_PACKAGE_HOOKS;
|
||||
chmod 0755, "hooks/update";
|
||||
|
||||
# run gitolite's post-init hook if you can. GL_REPO will be correct on a
|
||||
# wildcard create but on a normal (config file) create it will actually be
|
||||
# set to "gitolite-admin", so we need to make sure that for the duration
|
||||
# of the hook it is set correctly.
|
||||
system("env GL_REPO='$repo' hooks/gl-post-init") if -x "hooks/gl-post-init";
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue