bugfix: smart http mode wasn't running pre_ and post_ git triggers
(while we're about it, we also steal Michael Brown's idea (patch #2 in [1] and get rid of GIT_HTTP_BACKEND). [1]: http://groups.google.com/group/gitolite/msg/adfae758dd28f2a8
This commit is contained in:
parent
6d057fb84c
commit
196706c145
|
@ -52,7 +52,6 @@ Please adjust the instructions below to reflect your setup (users and paths).
|
|||
|
||||
Edit your .gitolite.rc and add
|
||||
|
||||
$ENV{GIT_HTTP_BACKEND} = "/usr/libexec/git-core/git-http-backend";
|
||||
$ENV{PATH} .= ":/opt/git/bin";
|
||||
|
||||
at the very top (as described in `t/smart-http.root-setup`).
|
||||
|
|
|
@ -121,11 +121,13 @@ sub main {
|
|||
gl_log( "pre_git", $repo, $user, $aa, 'any', "-> $ret" );
|
||||
}
|
||||
|
||||
exec $ENV{GIT_HTTP_BACKEND} if $ENV{REQUEST_URI};
|
||||
|
||||
trigger( 'PRE_GIT', $repo, $user, $aa, 'any', $verb );
|
||||
if ($ENV{REQUEST_URI}) {
|
||||
_system( "git", "http-backend" );
|
||||
} else {
|
||||
my $repodir = "'$rc{GL_REPO_BASE}/$repo.git'";
|
||||
_system( "git", "shell", "-c", "$verb $repodir" );
|
||||
}
|
||||
trigger( 'POST_GIT', $repo, $user, $aa, 'any', $verb );
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,6 @@ cd $GITOLITE_HTTP_HOME
|
|||
HOME=$GITOLITE_HTTP_HOME gitolite setup -a admin
|
||||
|
||||
# insert some essential lines at the beginning of the rc file
|
||||
echo '$ENV{GIT_HTTP_BACKEND} = "/usr/libexec/git-core/git-http-backend";' > 1
|
||||
echo '$ENV{PATH} .= ":$ENV{GITOLITE_HTTP_HOME}/bin";' >> 1
|
||||
echo >> 1
|
||||
cat .gitolite.rc >> 1
|
||||
|
|
Loading…
Reference in a new issue