push over HTTP doesn't work with gitolite (master branch)
Created by: davispuh
push over HTTP doesn't work with gitolite (master branch)
it fails with
Pushing to http://localhost/test.git
POST git-receive-pack (359 bytes)
remote: Empty compile time value given to use lib at hooks/update line 6[K
remote: Use of uninitialized value in require at hooks/update line 7.[K
remote: Can't locate Gitolite/Hooks/Update.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at hooks/update line 7.[K
remote: BEGIN failed--compilation aborted at hooks/update line 7.[K
remote: error: hook declined to update refs/heads/master[K
To http://localhost/test.git
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'http://localhost/test.git'
it happens because $ENV{GL_LIBDIR}
isn't set and is required by ~/.gitolite/hooks/common/update
(line 6)
I don't know if this hook is required for HTTP, if it's required then before calling it need assign GL_LIBDIR
or if it's not then can do similar like it's done earlier...
BEGIN {
exit 0 if exists $ENV{GL_BYPASS_UPDATE_HOOK};
}
but it's auto generated so need place it in generation step....