lib-git-svn.sh: Avoid setting web server variables unnecessarily

If the SVN_HTTPD_PORT variable is not set, then we will not even
attempt to start a web server in the start_httpd function (despite
it's name), so there is no need to determine values for the
SVN_HTTPD_PATH and SVN_HTTPD_MODULE_PATH variables.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Ramsay Jones 2010-12-14 18:22:29 +00:00 committed by Junio C Hamano
parent 531dd7bbf4
commit b6fe97483f
1 changed files with 25 additions and 22 deletions

View File

@ -68,6 +68,8 @@ svn_cmd () {
svn "$orig_svncmd" --config-dir "$svnconf" "$@" svn "$orig_svncmd" --config-dir "$svnconf" "$@"
} }


if test -n "$SVN_HTTPD_PORT"
then
for d in \ for d in \
"$SVN_HTTPD_PATH" \ "$SVN_HTTPD_PATH" \
/usr/sbin/apache2 \ /usr/sbin/apache2 \
@ -90,6 +92,7 @@ for d in \
break break
fi fi
done done
fi


start_httpd () { start_httpd () {
repo_base_path="$1" repo_base_path="$1"