summaryrefslogtreecommitdiff
path: root/git-instaweb.sh
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2008-01-29 07:08:44 +0100
committerJunio C Hamano <gitster@pobox.com>2008-01-29 00:49:28 -0800
commitab989adf6ab32fb80fd42cc95ed0eacb029258fe (patch)
tree219fb3317f3126a3eddce99edf33bbec873e9dc0 /git-instaweb.sh
parentf7ff09d7188aaa60710aa2e6d0da19b70adac2f1 (diff)
downloadgit-ab989adf6ab32fb80fd42cc95ed0eacb029258fe.tar.gz
instaweb: use 'browser.<tool>.path' config option if it's set.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-instaweb.sh')
-rwxr-xr-xgit-instaweb.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/git-instaweb.sh b/git-instaweb.sh
index ad0723ccc6..3e4452bc4b 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -274,6 +274,14 @@ webrick)
;;
esac
+init_browser_path() {
+ browser_path="`git config browser.$1.path`"
+ test -z "$browser_path" && browser_path="$1"
+}
+
start_httpd
url=http://127.0.0.1:$port
-test -n "$browser" && "$browser" $url || echo $url
+test -n "$browser" && {
+ init_browser_path "$browser"
+ "$browser_path" $url
+} || echo $url