提交 d3a866bc 编写于 作者: C Christian Couder 提交者: Junio C Hamano

Use {web,instaweb,help}.browser config options.

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: NChristian Couder <chriscool@tuxfamily.org>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 5d6491c7
......@@ -70,9 +70,13 @@ do
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
......
......@@ -24,6 +24,7 @@ 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`"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册