diff --git a/src/triggers/post-compile/update-git-configs b/src/triggers/post-compile/update-git-configs index bd7ff13..7069f6c 100755 --- a/src/triggers/post-compile/update-git-configs +++ b/src/triggers/post-compile/update-git-configs @@ -16,6 +16,13 @@ use warnings; my $RB = $rc{GL_REPO_BASE}; _chdir($RB); +# ---------------------------------------------------------------------- +# skip if arg-0 is POST_CREATE and no arg-2 (user name) exists; this means +# it's been triggered by a *normal* (not "wild") repo creation, which in turn +# means a POST_COMPILE should be following so there's no need to waste time +# running this once for each new repo +exit 0 if @ARGV and $ARGV[0] eq 'POST_CREATE' and not $ARGV[2]; + # ---------------------------------------------------------------------- # if called from POST_CREATE, we have only a single repo to worry about if (@ARGV and $ARGV[0] eq 'POST_CREATE') { diff --git a/src/triggers/post-compile/update-git-daemon-access-list b/src/triggers/post-compile/update-git-daemon-access-list index 4585f44..cc865f1 100755 --- a/src/triggers/post-compile/update-git-daemon-access-list +++ b/src/triggers/post-compile/update-git-daemon-access-list @@ -2,6 +2,13 @@ # this is probably the *fastest* git-daemon update possible. +# ---------------------------------------------------------------------- +# skip if arg-1 is POST_CREATE and no arg-3 (user name) exists; this means +# it's been triggered by a *normal* (not "wild") repo creation, which in turn +# means a POST_COMPILE should be following so there's no need to waste time +# running this once for each new repo +[ "$1" = "POST_CREATE" ] && [ -z "$3" ] && exit 0; + EO=git-daemon-export-ok RB=`gitolite query-rc GL_REPO_BASE` export EO RB diff --git a/src/triggers/post-compile/update-gitweb-access-list b/src/triggers/post-compile/update-gitweb-access-list index f97061f..b7faee2 100755 --- a/src/triggers/post-compile/update-gitweb-access-list +++ b/src/triggers/post-compile/update-gitweb-access-list @@ -4,6 +4,13 @@ # whatever you want and contribute it back, as long as it is upward # compatible. +# ---------------------------------------------------------------------- +# skip if arg-1 is POST_CREATE and no arg-3 (user name) exists; this means +# it's been triggered by a *normal* (not "wild") repo creation, which in turn +# means a POST_COMPILE should be following so there's no need to waste time +# running this once for each new repo +[ "$1" = "POST_CREATE" ] && [ -z "$3" ] && exit 0; + plf=`gitolite query-rc GITWEB_PROJECTS_LIST` [ -z "$plf" ] && plf=$HOME/projects.list