summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5884f1f)
raw | patch | inline | side by side (parent: 5884f1f)
author | Christian Couder <chriscool@tuxfamily.org> | |
Sat, 2 Feb 2008 06:32:56 +0000 (07:32 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 5 Feb 2008 09:01:49 +0000 (01:01 -0800) |
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-instaweb.sh | patch | blob | history |
diff --git a/git-instaweb.sh b/git-instaweb.sh
index 3e4452bc4bc1fe57c75848ccd9c073aeb065a980..6f91c8f845b2c4ef426a6451ac07abae2bce9488 100755 (executable)
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
fqgitdir="$GIT_DIR"
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`"
# 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
;;
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" && {
- init_browser_path "$browser"
- "$browser_path" $url
-} || echo $url
+
+if test -n "$browser"; then
+ git web--browse -b "$browser" $url || echo $url
+else
+ git web--browse -c "instaweb.browser" $url || echo $url
+fi