summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5d6491c)
raw | patch | inline | side by side (parent: 5d6491c)
author | Christian Couder <chriscool@tuxfamily.org> | |
Sun, 2 Dec 2007 05:08:00 +0000 (06:08 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 9 Dec 2007 09:19:54 +0000 (01:19 -0800) |
Now "git-instaweb" will try to use the browser configured as
"web.browser", if "instaweb.browser" is not set.
"git-browse-help" will check first "help.browser" and then
"web.browser".
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
"web.browser", if "instaweb.browser" is not set.
"git-browse-help" will check first "help.browser" and then
"web.browser".
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-browse-help.sh | patch | blob | history | |
git-instaweb.sh | patch | blob | history |
diff --git a/git-browse-help.sh b/git-browse-help.sh
index 76eff01bab707f76a147160e55430868ae3dce97..817b3792c8cf35cdd5e594e4fb7aca3d62a49aee 100755 (executable)
--- a/git-browse-help.sh
+++ b/git-browse-help.sh
done
if test -z "$browser"; then
- browser=`git config web.browser`
+ for opt in "help.browser" "web.browser"
+ do
+ browser="`git config $opt`"
+ test -z "$browser" || break
+ done
if test -n "$browser" && ! valid_tool "$browser"; then
- echo >&2 "git config option web.browser set to unknown browser: $browser"
+ echo >&2 "git config option $opt set to unknown browser: $browser"
echo >&2 "Resetting to default..."
unset browser
fi
diff --git a/git-instaweb.sh b/git-instaweb.sh
index 8503ae40309e6c8b1547289c9950d99f4bf736b5..42d8d7fc6ee33546d6d7113c1c9025f90ef4db06 100755 (executable)
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
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`"