diff options
author | Christian Couder <chriscool@tuxfamily.org> | 2007-12-02 06:08:00 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-12-09 01:19:54 -0800 |
commit | d3a866bc8b5604d31638648d671e524cc84fbb26 (patch) | |
tree | 656d53541107939a4c6203fa0eaad6d6150659f8 /git-browse-help.sh | |
parent | 5d6491c7c7536ab930a6e9ce2ec3b5249d4c283f (diff) | |
download | git-d3a866bc8b5604d31638648d671e524cc84fbb26.tar.gz |
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: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-browse-help.sh')
-rwxr-xr-x | git-browse-help.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/git-browse-help.sh b/git-browse-help.sh index 76eff01bab..817b3792c8 100755 --- a/git-browse-help.sh +++ b/git-browse-help.sh @@ -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 |