mirror of
https://github.com/git/git.git
synced 2024-10-28 12:59:41 +01:00
instaweb: use 'browser.<tool>.path' config option if it's set.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
f7ff09d718
commit
ab989adf6a
2 changed files with 11 additions and 2 deletions
|
@ -369,7 +369,8 @@ branch.<name>.rebase::
|
||||||
|
|
||||||
browser.<tool>.path::
|
browser.<tool>.path::
|
||||||
Override the path for the given tool that may be used to
|
Override the path for the given tool that may be used to
|
||||||
browse HTML help. See '-w' option in linkgit:git-help[1].
|
browse HTML help (see '-w' option in linkgit:git-help[1]) or a
|
||||||
|
working repository in gitweb (see linkgit:git-instaweb[1]).
|
||||||
|
|
||||||
clean.requireForce::
|
clean.requireForce::
|
||||||
A boolean to make git-clean do nothing unless given -f
|
A boolean to make git-clean do nothing unless given -f
|
||||||
|
|
|
@ -274,6 +274,14 @@ webrick)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
init_browser_path() {
|
||||||
|
browser_path="`git config browser.$1.path`"
|
||||||
|
test -z "$browser_path" && browser_path="$1"
|
||||||
|
}
|
||||||
|
|
||||||
start_httpd
|
start_httpd
|
||||||
url=http://127.0.0.1:$port
|
url=http://127.0.0.1:$port
|
||||||
test -n "$browser" && "$browser" $url || echo $url
|
test -n "$browser" && {
|
||||||
|
init_browser_path "$browser"
|
||||||
|
"$browser_path" $url
|
||||||
|
} || echo $url
|
||||||
|
|
Loading…
Reference in a new issue