Commit 2e0c2902 authored by Christian Couder's avatar Christian Couder Committed by Junio C Hamano

instaweb: use 'git-web--browse' to launch browser.

Signed-off-by: Christian Couder's avatarChristian Couder <>
Signed-off-by: default avatarJunio C Hamano <>
parent 5884f1fe
......@@ -24,8 +24,6 @@ restart restart the web server
local="`git config --bool --get instaweb.local`"
httpd="`git config --get instaweb.httpd`"
browser="`git config --get instaweb.browser`"
test -z "$browser" && browser="`git config --get web.browser`"
port=`git config --get instaweb.port`
module_path="`git config --get instaweb.modulepath`"
......@@ -36,9 +34,6 @@ conf="$GIT_DIR/gitweb/httpd.conf"
# if installed, it doesn't need further configuration (module_path)
test -z "$httpd" && httpd='lighttpd -f'
# probably the most popular browser among gitweb users
test -z "$browser" && browser='firefox'
# any untaken local port will do...
test -z "$port" && port=1234
......@@ -274,14 +269,11 @@ webrick)
init_browser_path() {
browser_path="`git config browser.$1.path`"
test -z "$browser_path" && browser_path="$1"
test -n "$browser" && {
init_browser_path "$browser"
"$browser_path" $url
} || echo $url
if test -n "$browser"; then
git web--browse -b "$browser" $url || echo $url
git web--browse -c "instaweb.browser" $url || echo $url
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment