diff --git a/doc/http.mkd b/doc/http.mkd index bfc7544..3b9809e 100644 --- a/doc/http.mkd +++ b/doc/http.mkd @@ -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`). diff --git a/src/gitolite-shell b/src/gitolite-shell index 07e2cd5..af03a36 100755 --- a/src/gitolite-shell +++ b/src/gitolite-shell @@ -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 ); - my $repodir = "'$rc{GL_REPO_BASE}/$repo.git'"; - _system( "git", "shell", "-c", "$verb $repodir" ); + 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 ); } diff --git a/t/smart-http.root-setup b/t/smart-http.root-setup index ed3d413..dd42ad9 100755 --- a/t/smart-http.root-setup +++ b/t/smart-http.root-setup @@ -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