>1. Since I followed installation manual and setup by cloning
>gitolite I wound out that at least one ENV variable is not
>set. Thus the hooks could not find path to lib because of:
>*use lib $ENV{GL_LIBDIR};* I found this by manually triggering
>*/home/git/.gitolite/hooks/gitolite-admin/post-update* So I tested by
>manually pointing to */home/git/bin/lib* instead of *$ENV{GL_LIBDIR}*
>But it was not all.
FWIW, this shouldn't be an issue in normal usage. GL_LIBDIR is supposed
to be set by the gitolite-shell command at the very beginning of it:
use FindBin;
BEGIN { $ENV{GL_BINDIR} = $FindBin::RealBin; }
BEGIN { $ENV{GL_LIBDIR} = "$ENV{GL_BINDIR}/lib"; }
use lib $ENV{GL_LIBDIR};
And since in normal usage everything is supposed to be going through
gitolite-shell, the hooks should get that. You could put some debugging
print commands in either the hook or gitolite-shell to see if FindBin
is getting the wrong pathname for some reason. If the value is set
correctly in gitolite-shell, then perhaps something is cleaning the
environment down to the hook.
>2. Second issue was very very tricky. Gitolite is expecting `master` as
>main branch, while VS Code pushed `main`. Gitolite simply did nothing,
>because it did not find `master` in my fresh push.
Ah, I guess that's only an issue for the gitolite-admin repo; didn't
know about that one.
--Ken