the 3 shipped post-create programs should exit when called on a normal repo creation

This commit is contained in:
Sitaram Chamarty 2012-05-25 12:28:14 +05:30
parent 0f3a09ce60
commit 37e97d29fe
3 changed files with 21 additions and 0 deletions

View file

@ -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') {

View file

@ -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

View file

@ -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