diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-02-16 17:57:47 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-02-16 17:57:47 -0800 |
commit | 990732609ce735c482e571ad95767edf1d693b41 (patch) | |
tree | 517384395ef2991463a5da92c36c386a132c5aa0 /git-instaweb.sh | |
parent | 987e315a6b5a5dd224602f09b9dc7c0fe9c7d024 (diff) | |
parent | cb45f83cbdfcde4333ea5982b3c763e136fc599c (diff) | |
download | git-990732609ce735c482e571ad95767edf1d693b41.tar.gz |
Merge branch 'cc/browser'
* cc/browser:
Documentation: add 'git-web--browse.txt' and simplify other docs.
git-web--browse: fix misplaced quote in init_browser_path()
web--browse: Add a few quotes in 'init_browser_path'.
Documentation: instaweb: add 'git-web--browse' information.
Adjust .gitignore for 5884f1(Rename 'git-help--browse.sh'...)
git-web--browse: do not start the browser with nohup
instaweb: use 'git-web--browse' to launch browser.
Rename 'git-help--browse.sh' to 'git-web--browse.sh'.
help--browse: add '--config' option to check a config option for a browser.
help: make 'git-help--browse' usable outside 'git-help'.
Conflicts:
git-web--browse.sh
Diffstat (limited to 'git-instaweb.sh')
-rwxr-xr-x | git-instaweb.sh | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/git-instaweb.sh b/git-instaweb.sh index 3e4452bc4b..6f91c8f845 100755 --- a/git-instaweb.sh +++ b/git-instaweb.sh @@ -24,8 +24,6 @@ restart restart the web server 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`" @@ -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) ;; 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 |